Skip to content

Commit 0418d73

Browse files
craig[bot]pav-kv
andcommitted
Merge #149430
149430: kvserver: use merged replica ID const directly r=arulajmani a=pav-kv Epic: CRDB-49111 Co-authored-by: Pavel Kalinnikov <[email protected]>
2 parents 48775d3 + 2239a7a commit 0418d73

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/kv/kvserver/replica_raftstorage.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,7 @@ func (r *Replica) applySnapshotRaftMuLocked(
696696
// The necessary on-disk state is read. Update the in-memory Replica and Store
697697
// state now.
698698

699-
subPHs, err := r.clearSubsumedReplicaInMemoryData(ctx, subsumedRepls, mergedTombstoneReplicaID)
699+
subPHs, err := r.clearSubsumedReplicaInMemoryData(ctx, subsumedRepls)
700700
if err != nil {
701701
log.Fatalf(ctx, "failed to clear in-memory data of subsumed replicas while applying snapshot: %+v", err)
702702
}
@@ -796,7 +796,7 @@ func (r *Replica) applySnapshotRaftMuLocked(
796796
// replicas. This method requires that each of the subsumed replicas raftMu is
797797
// held.
798798
func (r *Replica) clearSubsumedReplicaInMemoryData(
799-
ctx context.Context, subsumedRepls []*Replica, subsumedNextReplicaID roachpb.ReplicaID,
799+
ctx context.Context, subsumedRepls []*Replica,
800800
) ([]*ReplicaPlaceholder, error) {
801801
//
802802
var phs []*ReplicaPlaceholder
@@ -808,7 +808,7 @@ func (r *Replica) clearSubsumedReplicaInMemoryData(
808808
// allowed in (perhaps not involving any of the RangeIDs known to the merge
809809
// but still touching its keyspace) and causing corruption.
810810
ph, err := r.store.removeInitializedReplicaRaftMuLocked(
811-
ctx, sr, subsumedNextReplicaID, "subsumed by snapshot",
811+
ctx, sr, mergedTombstoneReplicaID, "subsumed by snapshot",
812812
RemoveOptions{
813813
// The data was already destroyed by clearSubsumedReplicaDiskData.
814814
DestroyData: false,

0 commit comments

Comments
 (0)