{"action":"created","issue":{"url":"https://api.github.com/repos/cockroachdb/cockroach/issues/7159","repository_url":"https://api.github.com/repos/cockroachdb/cockroach","labels_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/7159/labels{/name}","comments_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/7159/comments","events_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/7159/events","html_url":"https://github.com/cockroachdb/cockroach/pull/7159","id":159696894,"number":7159,"title":"storage: refactor txn status checks to use switch statements","user":{"login":"vivekmenezes","id":11774212,"avatar_url":"https://avatars.githubusercontent.com/u/11774212?v=3","gravatar_id":"","url":"https://api.github.com/users/vivekmenezes","html_url":"https://github.com/vivekmenezes","followers_url":"https://api.github.com/users/vivekmenezes/followers","following_url":"https://api.github.com/users/vivekmenezes/following{/other_user}","gists_url":"https://api.github.com/users/vivekmenezes/gists{/gist_id}","starred_url":"https://api.github.com/users/vivekmenezes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vivekmenezes/subscriptions","organizations_url":"https://api.github.com/users/vivekmenezes/orgs","repos_url":"https://api.github.com/users/vivekmenezes/repos","events_url":"https://api.github.com/users/vivekmenezes/events{/privacy}","received_events_url":"https://api.github.com/users/vivekmenezes/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"tschottdorf","id":5076964,"avatar_url":"https://avatars.githubusercontent.com/u/5076964?v=3","gravatar_id":"","url":"https://api.github.com/users/tschottdorf","html_url":"https://github.com/tschottdorf","followers_url":"https://api.github.com/users/tschottdorf/followers","following_url":"https://api.github.com/users/tschottdorf/following{/other_user}","gists_url":"https://api.github.com/users/tschottdorf/gists{/gist_id}","starred_url":"https://api.github.com/users/tschottdorf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tschottdorf/subscriptions","organizations_url":"https://api.github.com/users/tschottdorf/orgs","repos_url":"https://api.github.com/users/tschottdorf/repos","events_url":"https://api.github.com/users/tschottdorf/events{/privacy}","received_events_url":"https://api.github.com/users/tschottdorf/received_events","type":"User","site_admin":false},"milestone":null,"comments":3,"created_at":"2016-06-10T18:43:20Z","updated_at":"2016-06-12T01:15:16Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/cockroachdb/cockroach/pulls/7159","html_url":"https://github.com/cockroachdb/cockroach/pull/7159","diff_url":"https://github.com/cockroachdb/cockroach/pull/7159.diff","patch_url":"https://github.com/cockroachdb/cockroach/pull/7159.patch"},"body":"\n\n<!-- Reviewable:start -->\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"35\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/cockroachdb/cockroach/7159)\n<!-- Reviewable:end -->\n"},"comment":{"url":"https://api.github.com/repos/cockroachdb/cockroach/issues/comments/225403575","html_url":"https://github.com/cockroachdb/cockroach/pull/7159#issuecomment-225403575","issue_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/7159","id":225403575,"user":{"login":"tamird","id":1535036,"avatar_url":"https://avatars.githubusercontent.com/u/1535036?v=3","gravatar_id":"","url":"https://api.github.com/users/tamird","html_url":"https://github.com/tamird","followers_url":"https://api.github.com/users/tamird/followers","following_url":"https://api.github.com/users/tamird/following{/other_user}","gists_url":"https://api.github.com/users/tamird/gists{/gist_id}","starred_url":"https://api.github.com/users/tamird/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tamird/subscriptions","organizations_url":"https://api.github.com/users/tamird/orgs","repos_url":"https://api.github.com/users/tamird/repos","events_url":"https://api.github.com/users/tamird/events{/privacy}","received_events_url":"https://api.github.com/users/tamird/received_events","type":"User","site_admin":false},"created_at":"2016-06-12T01:15:15Z","updated_at":"2016-06-12T01:15:15Z","body":"\n\n\n\n\n\nReview status: all files reviewed at latest revision, 1 unresolved discussion, all commit checks successful.\n\n---\n\n*[storage/replica_command.go, line 408 \\[r1\\]](https://reviewable.io:443/reviews/cockroachdb/cockroach/7159#-KJw-md_gNYC-LNBhbTR:-KK1A3heEM4JZEPs0zL7:-1308188312) ([raw file](https://github.com/cockroachdb/cockroach/blob/20915732c915cded9388f5017171678a3bb4a20b/storage/replica_command.go#L408)):*\n<details><summary><i>Previously, vivekmenezes wrote…</i></summary>\n> the committed case fallthrough to this. I tried to consolidate it into a single error. The default case should be an error; is there a problem with this error? \n</details>\nThis error is appropriate for roachpb.COMMITTED, but not for some yet-unintroduced variant, which is what this `default` style is typically used for (including in this very commit where you return `fmt.Sprintf(\"bad txn status: %s\", reply.Txn)`).\n\n---\n\n\n*Comments from [Reviewable](https://reviewable.io:443/reviews/cockroachdb/cockroach/7159)*\n<!-- Sent from Reviewable.io -->\n"}}
{"actor":{"display_login":"tamird"}}