Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

storage: correctly gc locally-anchored transactions #9036

Merged
merged 1 commit into from Sep 1, 2016

Conversation

tbg
Copy link
Member

@tbg tbg commented Sep 1, 2016

The previous way of computing the key range for the GCRequest was incorrectly
making the assumption that (roachpb.Key).Next respected ordering on the
corresponding addressing-resolved keys.

This lead to intents on RangeDescriptors not being resolved during range splits
and perhaps rebalances, as observed in #8978.


This change is Reviewable

The previous way of computing the key range for the GCRequest was incorrectly
making the assumption that `(roachpb.Key).Next` respected ordering on the
corresponding addressing-resolved keys.

This lead to intents on RangeDescriptors not being resolved during range splits
and perhaps rebalances, as observed in cockroachdb#8978.
@petermattis
Copy link
Collaborator

:lgtm:


Review status: 0 of 3 files reviewed at latest revision, all discussions resolved, some commit checks pending.


Comments from Reviewable

@tbg tbg merged commit baaf188 into cockroachdb:master Sep 1, 2016
@tbg tbg deleted the et-gc branch September 1, 2016 19:18
@tamird
Copy link
Contributor

tamird commented Sep 1, 2016

Reviewed 3 of 3 files at r1.
Review status: all files reviewed at latest revision, 3 unresolved discussions, all commit checks successful.


storage/intent_resolver.go, line 347 [r1] (raw file):

              //
              // #7880 will address this by making GCRequest less special and
              // thus obviating the need to cook up an artificial range here.

s/obviating/obviate/

probably want to have the string "TODO" somewhere in here.


storage/replica_command.go, line 791 [r1] (raw file):

  if bytes.Compare(span.Key, keys.LocalRangeMax) < 0 {
      if bytes.Compare(span.EndKey, keys.LocalRangeMax) >= 0 {
          log.Fatalf(context.Background(), "a local intent range may not have a non-local portion: %s", span)

why not TODO?


storage/replica_test.go, line 3289 [r1] (raw file):

          defer tc.Stop()

          ctx := log.WithLogTag(context.Background(), "testcase", i)

👍 neat


Comments from Reviewable

@tbg
Copy link
Member Author

tbg commented Sep 1, 2016

Review status: all files reviewed at latest revision, 2 unresolved discussions, all commit checks successful.


storage/intent_resolver.go, line 347 [r1] (raw file):

Previously, tamird (Tamir Duberstein) wrote…

s/obviating/obviate/

probably want to have the string "TODO" somewhere in here.

Won't open a PR for this, but will keep in mind.

storage/replica_command.go, line 791 [r1] (raw file):

Previously, tamird (Tamir Duberstein) wrote…

why not TODO?

That's not a TODO, it simply must not happen. This indicates that some broken key range such as [/RangeDescriptor/"a", "some user key"). A key range is either completely local or completely non-local.

Comments from Reviewable

@tamird
Copy link
Contributor

tamird commented Sep 1, 2016

Review status: all files reviewed at latest revision, 2 unresolved discussions, all commit checks successful.


storage/replica_command.go, line 791 [r1] (raw file):

Previously, tschottdorf (Tobias Schottdorf) wrote…

That's not a TODO, it simply must not happen. This indicates that some broken key range such as [/RangeDescriptor/"a", "some user key"). A key range is either completely local or completely non-local.

I meant `context.TODO()`. If this happens (and of course, it must not), you might want to pass a context with some....context.

Comments from Reviewable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants