{"action":"created","issue":{"url":"https://api.github.com/repos/cockroachdb/cockroach/issues/2555","labels_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/2555/labels{/name}","comments_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/2555/comments","events_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/2555/events","html_url":"https://github.com/cockroachdb/cockroach/issues/2555","id":107224773,"number":2555,"title":"sql: allow user priority to be set via SQL","user":{"login":"spencerkimball","id":6147149,"avatar_url":"https://avatars.githubusercontent.com/u/6147149?v=3","gravatar_id":"","url":"https://api.github.com/users/spencerkimball","html_url":"https://github.com/spencerkimball","followers_url":"https://api.github.com/users/spencerkimball/followers","following_url":"https://api.github.com/users/spencerkimball/following{/other_user}","gists_url":"https://api.github.com/users/spencerkimball/gists{/gist_id}","starred_url":"https://api.github.com/users/spencerkimball/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spencerkimball/subscriptions","organizations_url":"https://api.github.com/users/spencerkimball/orgs","repos_url":"https://api.github.com/users/spencerkimball/repos","events_url":"https://api.github.com/users/spencerkimball/events{/privacy}","received_events_url":"https://api.github.com/users/spencerkimball/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cockroachdb/cockroach/labels/easy","name":"easy","color":"009800"},{"url":"https://api.github.com/repos/cockroachdb/cockroach/labels/helpwanted","name":"helpwanted","color":"bfdadc"},{"url":"https://api.github.com/repos/cockroachdb/cockroach/labels/SQL","name":"SQL","color":"bfd4f2"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":15,"created_at":"2015-09-18T15:32:06Z","updated_at":"2016-01-06T12:33:05Z","closed_at":null,"body":"Cockroach internally allows a user priority to be set on all operations. This is particularly relevant to the operation of transactions, where the user priority is used to generate a random priority for the transaction as a whole. Transactions which conflict use the priorities to determine which can be pushed or aborted as necessary.\r\n\r\n* Do some research into the SQL 92 ANSI standard and see if there's any equivalent or near-equivalent mechanism for supporting priorities.\r\n* Make determination whether to use existing prioritization scheme or to introduce our own (probably something similar to the way we currently set the database syntax via `SET SYNTAX = modern`).\r\n* Thread the user priority through to the underlying KV commands."},"comment":{"url":"https://api.github.com/repos/cockroachdb/cockroach/issues/comments/169314094","html_url":"https://github.com/cockroachdb/cockroach/issues/2555#issuecomment-169314094","issue_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/2555","id":169314094,"user":{"login":"yaojingguo","id":516386,"avatar_url":"https://avatars.githubusercontent.com/u/516386?v=3","gravatar_id":"","url":"https://api.github.com/users/yaojingguo","html_url":"https://github.com/yaojingguo","followers_url":"https://api.github.com/users/yaojingguo/followers","following_url":"https://api.github.com/users/yaojingguo/following{/other_user}","gists_url":"https://api.github.com/users/yaojingguo/gists{/gist_id}","starred_url":"https://api.github.com/users/yaojingguo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yaojingguo/subscriptions","organizations_url":"https://api.github.com/users/yaojingguo/orgs","repos_url":"https://api.github.com/users/yaojingguo/repos","events_url":"https://api.github.com/users/yaojingguo/events{/privacy}","received_events_url":"https://api.github.com/users/yaojingguo/received_events","type":"User","site_admin":false},"created_at":"2016-01-06T12:33:05Z","updated_at":"2016-01-06T12:33:05Z","body":"@petermattis, you are right. We don't need such a larger priority range. I have updated my design in my original comment. Please have a look."}}