Skip to content

Commit

Permalink
kvstorage: improve comment on DestroyReplica
Browse files Browse the repository at this point in the history
Epic: CRDB-220
Release note: None
  • Loading branch information
tbg committed Feb 8, 2023
1 parent a5cf9d5 commit 6b7de86
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pkg/kv/kvserver/kvstorage/destroy.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,13 @@ func ClearRangeData(
}

// DestroyReplica destroys all or a part of the Replica's state, installing a
// RangeTombstone in its place.
// RangeTombstone in its place. Due to merges, splits, etc, there is a need
// to control which part of the state this method actually gets to remove,
// which is done via the provided options[^1]; the caller is always responsible
// for managing the remaining disk state accordingly.
//
// [^1] e.g., on a merge, the user data moves to the subsuming replica and must
// not be cleared.
func DestroyReplica(
ctx context.Context,
rangeID roachpb.RangeID,
Expand Down

0 comments on commit 6b7de86

Please sign in to comment.