Skip to content

Commit b2d7f67

Browse files
committed
kvserver: fix comments referring to preDestroyRaftMuLocked
1 parent 8fc1655 commit b2d7f67

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pkg/kv/kvserver/replica_app_batch.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ func (b *replicaAppBatch) runPostAddTriggersReplicaOnly(
449449

450450
// Delete all of the Replica's data. We're going to delete the hard state too.
451451
// We've set the replica's in-mem status to reflect the pending destruction
452-
// above, and preDestroyRaftMuLocked will also add a range tombstone to the
452+
// above, and DestroyReplica will also add a range tombstone to the
453453
// batch, so that when we commit it, the removal is finalized.
454454
if err := kvstorage.DestroyReplica(ctx, b.r.RangeID, b.batch, b.batch, change.NextReplicaID(), kvstorage.ClearRangeDataOptions{
455455
ClearReplicatedBySpan: span,

pkg/kv/kvserver/snapshot_apply_prepare.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ func clearSubsumedReplicaDiskData(
156156
subsumedDescs []*roachpb.RangeDescriptor,
157157
) (clearedSpans []roachpb.Span, _ error) {
158158
// NB: we don't clear RangeID local key spans here. That happens
159-
// via the call to preDestroyRaftMuLocked.
159+
// via the call to DestroyReplica.
160160
getKeySpans := func(d *roachpb.RangeDescriptor) []roachpb.Span {
161161
return rditer.Select(d.RangeID, rditer.SelectOpts{
162162
ReplicatedBySpan: d.RSpan(),

0 commit comments

Comments
 (0)