storage: properly initialize RHS replica post-split#14305
storage: properly initialize RHS replica post-split#14305spencerkimball merged 1 commit intomasterfrom
Conversation
|
Reviewed 4 of 4 files at r1. Comments from Reviewable |
|
Review status: all files reviewed at latest revision, 1 unresolved discussion, all commit checks successful. pkg/storage/store.go, line 1914 at r1 (raw file):
leasePostApply does a lot of stuff, and this isn't the right place for all of it. In particular it clears the timestamp cache (which we carefully copied over from the LHS above). For today, let's do a quick fix and just do Comments from Reviewable |
|
Review status: all files reviewed at latest revision, 1 unresolved discussion, all commit checks successful. pkg/storage/store.go, line 1914 at r1 (raw file): Previously, bdarnell (Ben Darnell) wrote…
I really want to use the same execution pathway to init the lease-related aspects of the replica post-split. I think this is still the right place for these changes. For example, we only clear the timestamp cache if we're not the replica that owns the lease, so we actually will not be clearing it on the leaseholding replica after copying from the LHS. For the replicas which don't own the lease, we would expect the copying that was done in The Comments from Reviewable |
|
Review status: all files reviewed at latest revision, 1 unresolved discussion, all commit checks successful. pkg/storage/store.go, line 1914 at r1 (raw file): Previously, spencerkimball (Spencer Kimball) wrote…
It clears the timestamp cache if we don't have the lease, but it sets the low-water mark if we do. When I wrote the original comment I was afraid that this would advance the low-water timestamp, but now I think it's safe because it uses the backdated timestamp of the new lease. But my point is that there are subtle interactions there and I'd like more time to review everything before we start calling The leadership transfer won't do anything because the new range doesn't yet have a leader, and this needs to be considered in conjunction with the solution to #9727. Comments from Reviewable |
|
Does #9727 still require a fix? Pete's contention is nothing else needs to be done for that issue. |
|
He said that, but reopened it after he closed it. I don't know whether there's anything left to do or not. (after reviewing that and #9550, I think it may be a test-only issue) |
|
Anyway, we've built the beta candidate now, so it's getting a little late for the quick fix. I'll take another look at this PR and see if it's safe to use |
|
Review status: all files reviewed at latest revision, 1 unresolved discussion, all commit checks successful. pkg/storage/store.go, line 1914 at r1 (raw file): Previously, bdarnell (Ben Darnell) wrote…
By invoking this execution pathway, I'm trying to avoid creating more work down the road in the best case and new bugs in the worst case. I understand the hesitancy to sign off without more time spent reviewing There are two bools which control the logic:
Comments from Reviewable |
|
Review status: all files reviewed at latest revision, 1 unresolved discussion, all commit checks successful. Comments from Reviewable |
Ensure that the execution pathway used after a new lease is applied to a
range is invoked after splitting a range on the newly created lease for
the RHS of the split.
Fixes #13876
Closes #13875
This change is