{"action":"created","issue":{"url":"https://api.github.com/repos/cockroachdb/cockroach/issues/26554","repository_url":"https://api.github.com/repos/cockroachdb/cockroach","labels_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/26554/labels{/name}","comments_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/26554/comments","events_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/26554/events","html_url":"https://github.com/cockroachdb/cockroach/pull/26554","id":330849250,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkzNzU2MzE5","number":26554,"title":"server/storage: Add admin endpoint to manually run range through queue","user":{"login":"a-robinson","id":7085343,"node_id":"MDQ6VXNlcjcwODUzNDM=","avatar_url":"https://avatars3.githubusercontent.com/u/7085343?v=4","gravatar_id":"","url":"https://api.github.com/users/a-robinson","html_url":"https://github.com/a-robinson","followers_url":"https://api.github.com/users/a-robinson/followers","following_url":"https://api.github.com/users/a-robinson/following{/other_user}","gists_url":"https://api.github.com/users/a-robinson/gists{/gist_id}","starred_url":"https://api.github.com/users/a-robinson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/a-robinson/subscriptions","organizations_url":"https://api.github.com/users/a-robinson/orgs","repos_url":"https://api.github.com/users/a-robinson/repos","events_url":"https://api.github.com/users/a-robinson/events{/privacy}","received_events_url":"https://api.github.com/users/a-robinson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-06-09T03:33:43Z","updated_at":"2018-06-13T19:38:23Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/cockroachdb/cockroach/pulls/26554","html_url":"https://github.com/cockroachdb/cockroach/pull/26554","diff_url":"https://github.com/cockroachdb/cockroach/pull/26554.diff","patch_url":"https://github.com/cockroachdb/cockroach/pull/26554.patch"},"body":"Currently exposed as a GET because I was having trouble getting POSTs to\r\nwork and because they're annoying to send from browsers, but I'm happy\r\nto spend a bit more time on it if you think we should be strict about\r\nthat given that this endpoint does cause a change in the system.\r\n\r\nFixes part of #25073\r\n\r\nRelease note: Added a new admin server endpoint\r\n`/_admin/v1/queue/<queuename>/range/<rangeid>` which runs the specified\r\nrange through the specified internal queue, with the optional\r\n`?skip_should_queue=true` parameter telling the system to blindly run\r\nwithout first checking whether it needs to be run. Intended primarily\r\nfor debugging purposes."},"comment":{"url":"https://api.github.com/repos/cockroachdb/cockroach/issues/comments/397060025","html_url":"https://github.com/cockroachdb/cockroach/pull/26554#issuecomment-397060025","issue_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/26554","id":397060025,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NzA2MDAyNQ==","user":{"login":"a-robinson","id":7085343,"node_id":"MDQ6VXNlcjcwODUzNDM=","avatar_url":"https://avatars3.githubusercontent.com/u/7085343?v=4","gravatar_id":"","url":"https://api.github.com/users/a-robinson","html_url":"https://github.com/a-robinson","followers_url":"https://api.github.com/users/a-robinson/followers","following_url":"https://api.github.com/users/a-robinson/following{/other_user}","gists_url":"https://api.github.com/users/a-robinson/gists{/gist_id}","starred_url":"https://api.github.com/users/a-robinson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/a-robinson/subscriptions","organizations_url":"https://api.github.com/users/a-robinson/orgs","repos_url":"https://api.github.com/users/a-robinson/repos","events_url":"https://api.github.com/users/a-robinson/events{/privacy}","received_events_url":"https://api.github.com/users/a-robinson/received_events","type":"User","site_admin":false},"created_at":"2018-06-13T19:38:23Z","updated_at":"2018-06-13T19:38:23Z","author_association":"MEMBER","body":"I'd use that over the SQL version in all situations where we have UI access but not SQL access. I suppose we could use a local grpc client program to get the same effect, but it seems easier to just send a POST in such cases.\n\nAnyway, I've update the PR to address all comments. TFTRs!\n\n---\n\nReview status: :shipit: complete! 0 of 0 LGTMs obtained\n\n---\n\n*[pkg/server/serverpb/admin.proto, line 758 at r1](https://reviewable.io/reviews/cockroachdb/cockroach/26554#-LEbVVgJ6RXomZvP89Nx:-LEooEjE6VMLWJJ0YuVj:b-8s30xt) ([raw file](https://github.com/cockroachdb/cockroach/blob/d9e44040e2b14c893333b31a9f7931c8e4b24513/pkg/server/serverpb/admin.proto#L758)):*\n<details><summary><i>Previously, bdarnell (Ben Darnell) wrote…</i></summary><blockquote>\n\nI generally prefer to just use query parameters instead of building operation-specific path patterns. \n</blockquote></details>\n\nI thought the path pattern was more popular in REST API design, and there are a handful of other admin endpoints here that do something similar. I've changed it, though.\n\n---\n\n*[pkg/storage/store.go, line 4245 at r1](https://reviewable.io/reviews/cockroachdb/cockroach/26554#-LEXar4D_-9oEWUyaIDK-r1-4245:-LEkr8nb4zpDUTtG2V9T:b-afh902) ([raw file](https://github.com/cockroachdb/cockroach/blob/d9e44040e2b14c893333b31a9f7931c8e4b24513/pkg/storage/store.go#L4245)):*\n<details><summary><i>Previously, tschottdorf (Tobias Schottdorf) wrote…</i></summary><blockquote>\n\nNot required, but could this loop through all the queues registered with the scanner and match on the name? Then we'd not have to change anything when adding queues/changing a queue name.\n</blockquote></details>\n\nDone, although in order to make it less ridiculous I changed the name of the consistency queue from \"replica consistency checker\" to just \"consistencyChecker\". I'd go all the way down to \"consistency\", but do you think that would look confusing in the logs when it's used to annotate contexts?\n\n---\n\n*[pkg/storage/store.go, line 4270 at r1](https://reviewable.io/reviews/cockroachdb/cockroach/26554#-LEbVCV0BhbYmPbUNJPQ:-LEpQrKA7UxVygk2c5BI:b-wxlmwi) ([raw file](https://github.com/cockroachdb/cockroach/blob/d9e44040e2b14c893333b31a9f7931c8e4b24513/pkg/storage/store.go#L4270)):*\n<details><summary><i>Previously, bdarnell (Ben Darnell) wrote…</i></summary><blockquote>\n\nWhat about the queues that do run on non-leaseholders? Is there a way to override this? Maybe look at the queue itself to see if it requires the lease?\n</blockquote></details>\n\nDone. We'll now run on all nodes that have the replica if the lease isn't required.\n\n---\n\n*[pkg/storage/store.go, line 4277 at r1](https://reviewable.io/reviews/cockroachdb/cockroach/26554#-LEXar4D_-9oEWUyaIDK-r1-4277:-LEkrBKO-f120WgFSOzy:b-k1h98t) ([raw file](https://github.com/cockroachdb/cockroach/blob/d9e44040e2b14c893333b31a9f7931c8e4b24513/pkg/storage/store.go#L4277)):*\n<details><summary><i>Previously, tschottdorf (Tobias Schottdorf) wrote…</i></summary><blockquote>\n\nNo message here?\n</blockquote></details>\n\nThat was intentional in order to make sure the most relevant error shines through. If the leaseholder returns an error, we wouldn't want it to be covered up by an error from a non-leaseholder that just says it isn't the leaseholder. This is, of course, optimistically assuming that one of the replicas is able to get the lease. If that isn't true, something bigger is probably wrong.\n\nBut in order to allow running on replicas that aren't leaseholder for queues that don't require the lease, I've changed a few things around and am now returning a message here.\n\n---\n\n\n*Comments from [Reviewable](https://reviewable.io/reviews/cockroachdb/cockroach/26554#-:-LEonsev-DbIt6hcowzL:b-xtz20d)*\n<!-- Sent from Reviewable.io -->\n"}}
{"actor":{"display_login":"a-robinson"}}