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

release-21.1: kv: add to replicaGCQueue in replicaMsgAppDropper, not gcQueue #74124

Merged
merged 1 commit into from
Dec 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pkg/kv/kvserver/client_merge_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2724,7 +2724,7 @@ func TestStoreRangeMergeSlowUnabandonedFollower_WithSplit(t *testing.T) {
t.Fatal(pErr)
}

// Now split the newly merged range splits back out at exactly the same key.
// Now split the newly merged range back out at exactly the same key.
// When the replica GC queue looks in meta2 it will find the new RHS range, of
// which store2 is a member. Note that store2 does not yet have an initialized
// replica for this range, since it would intersect with the old RHS replica.
Expand All @@ -2737,7 +2737,7 @@ func TestStoreRangeMergeSlowUnabandonedFollower_WithSplit(t *testing.T) {
tc.RemoveVotersOrFatal(t, lhsDesc.StartKey.AsRawKey(), tc.Target(2))

// Transfer the lease on the new RHS to store2 and wait for it to apply. This
// will force its replica to of the new RHS to become up to date, which
// will force its replica of the new RHS to become up to date, which
// indirectly tests that the replica GC queue cleans up both the LHS replica
// and the old RHS replica.
tc.TransferRangeLeaseOrFatal(t, *newRHSDesc, tc.Target(2))
Expand Down
4 changes: 2 additions & 2 deletions pkg/kv/kvserver/split_trigger_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func (rd *replicaMsgAppDropper) ShouldDrop(startKey roachpb.RKey) (fmt.Stringer,
if lhsRepl == nil {
return nil, false
}
lhsRepl.store.gcQueue.AddAsync(context.Background(), lhsRepl, replicaGCPriorityDefault)
lhsRepl.store.replicaGCQueue.AddAsync(context.Background(), lhsRepl, replicaGCPriorityDefault)
return lhsRepl, true
}

Expand All @@ -48,7 +48,7 @@ type msgAppDropper interface {

// maybeDropMsgApp returns true if the incoming Raft message should be dropped.
// It does so if the recipient replica is uninitialized (i.e. has no state) and
// is waiting for a split trigger to apply,in which case delivering the message
// is waiting for a split trigger to apply,in which case delivering the message
// in this situation would result in an unnecessary Raft snapshot: the MsgApp
// would be rejected and the rejection would prompt the leader to send a
// snapshot, while the split trigger would likely populate the replica "for
Expand Down