{"action":"created","issue":{"url":"https://api.github.com/repos/cockroachdb/cockroach/issues/9419","repository_url":"https://api.github.com/repos/cockroachdb/cockroach","labels_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/9419/labels{/name}","comments_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/9419/comments","events_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/9419/events","html_url":"https://github.com/cockroachdb/cockroach/pull/9419","id":177336205,"number":9419,"title":"kv: resolve intents from a DelRange using a minimal span","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},"assignees":[{"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":4,"created_at":"2016-09-16T03:02:54Z","updated_at":"2016-09-26T19:35:57Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/cockroachdb/cockroach/pulls/9419","html_url":"https://github.com/cockroachdb/cockroach/pull/9419","diff_url":"https://github.com/cockroachdb/cockroach/pull/9419.diff","patch_url":"https://github.com/cockroachdb/cockroach/pull/9419.patch"},"body":"We were originally using the span passed into DelRange to resolve\r\nintents, even when the DelRange was limited using MaxSpanRequestKeys.\r\nAs a result, after a DelRange() over a large span was committed, the\r\nintent resolution would attempt to resolve all the keys in the span\r\neven when only a few were deleted.\r\n\r\nNow, when the MaxSpanRequestKeys limit is hit intent resolution will only\r\ntraverse the keys that were deleted.\r\n\r\n<!-- Reviewable:start -->\r\n---\r\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/cockroachdb/cockroach/9419)\r\n<!-- Reviewable:end -->\r\n"},"comment":{"url":"https://api.github.com/repos/cockroachdb/cockroach/issues/comments/249673908","html_url":"https://github.com/cockroachdb/cockroach/pull/9419#issuecomment-249673908","issue_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/9419","id":249673908,"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},"created_at":"2016-09-26T19:35:57Z","updated_at":"2016-09-26T19:35:57Z","body":"\n\n\n\nReview status: 0 of 6 files reviewed at latest revision, 4 unresolved discussions, some commit checks failed.\n\n---\n\n*[kv/db_test.go, line 293 at r1](https://reviewable.io:443/reviews/cockroachdb/cockroach/9419#-KSauflrNCxgtAOAfe88:-KSbwko57OBdbTixuszn:buhc2hb) ([raw file](https://github.com/cockroachdb/cockroach/blob/b088719ed0ef97e2da0acc4d4dbd602c1ffb3aba/kv/db_test.go#L293)):*\n<details><summary><i>Previously, tschottdorf (Tobias Schottdorf) wrote…</i></summary>\n> You can test the actual\n</details>\nYou mean the actual store?  I don't see an example of how that's done.\n\n---\n\n*[kv/db_test.go, line 351 at r1](https://reviewable.io:443/reviews/cockroachdb/cockroach/9419#-KSawZeI60FeDmhNnoJ4:-KSbwTwE7sl_6rDy9li7:b-cfpcf9) ([raw file](https://github.com/cockroachdb/cockroach/blob/b088719ed0ef97e2da0acc4d4dbd602c1ffb3aba/kv/db_test.go#L351)):*\n<details><summary><i>Previously, tschottdorf (Tobias Schottdorf) wrote…</i></summary>\n> This is potentially frail since you count *any* intent, not only the ones you wrote. You could do a consistent scan of the affected key range and intercept `MVCCResolveIntent{,Range}` via a CommandFilter.\n</details>\nOne can only intercept replica commands (not MVCC) via the filter. I could in theory add in a flag that is passed into the mvcc layer but I'm not convinced it's really needed here.\n\n---\n\n*[kv/txn_coord_sender.go, line 340 at r1](https://reviewable.io:443/reviews/cockroachdb/cockroach/9419#-KSayJrw_KYjumC_Nvbx:-KSbYe5C1tHEn35skzWa:b-896fix) ([raw file](https://github.com/cockroachdb/cockroach/blob/b088719ed0ef97e2da0acc4d4dbd602c1ffb3aba/kv/txn_coord_sender.go#L340)):*\n<details><summary><i>Previously, tschottdorf (Tobias Schottdorf) wrote…</i></summary>\n> Add a comment that we can't optimize the key spans here as we don't yet know what is going to be affected. This would affect queries such as\n> `DELETE FROM my.table LIMIT 10` if those are executed as a 1PC transaction (i.e. roughly a batch `(BeginTransaction, DeleteRange, EndTransaction)`.\n</details>\nDone.\n\n---\n\n*[roachpb/batch.go, line 190 at r1](https://reviewable.io:443/reviews/cockroachdb/cockroach/9419#-KSavPLihFO4HSa86-4P:-KSbZ_PE5OONICOp8TXU:b-bhnprq) ([raw file](https://github.com/cockroachdb/cockroach/blob/b088719ed0ef97e2da0acc4d4dbd602c1ffb3aba/roachpb/batch.go#L190)):*\n<details><summary><i>Previously, tschottdorf (Tobias Schottdorf) wrote…</i></summary>\n> Please update the comment and add/augment a unit test.\n</details>\nDone. Added a test\n\n---\n\n\n*Comments from [Reviewable](https://reviewable.io:443/reviews/cockroachdb/cockroach/9419)*\n<!-- Sent from Reviewable.io -->\n"}}
{"actor":{"display_login":"vivekmenezes"}}