Skip to content
Closed
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
9 changes: 3 additions & 6 deletions pkg/kv/kvserver/batcheval/cmd_compute_checksum.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,9 @@ func declareKeysComputeChecksum(
latchSpans.AddNonMVCC(spanset.SpanReadOnly, roachpb.Span{Key: keys.RangeDescriptorKey(rs.GetStartKey())})
}

// Version numbers for Replica checksum computation. Requests silently no-op
// unless the versions are compatible.
const (
ReplicaChecksumVersion = 4
ReplicaChecksumGCInterval = time.Hour
)
// ReplicaChecksumVersion versions the checksum computation. Requests silently no-op
// unless the versions between the requesting and requested replica are compatible.
const ReplicaChecksumVersion = 4

// ComputeChecksum starts the process of computing a checksum on the replica at
// a particular snapshot. The checksum is later verified through a
Expand Down
2 changes: 1 addition & 1 deletion pkg/kv/kvserver/consistency_queue_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ func TestCheckConsistencyInconsistent(t *testing.T) {
defer log.Scope(t).Close(t)

// This test prints a consistency checker diff, so it's
// good to make sure we're overly redacting said diff.
// good to make sure we're not overly redacting said diff.
defer log.TestingSetRedactable(true)()

// Test uses sticky registry to have persistent pebble state that could
Expand Down
5 changes: 2 additions & 3 deletions pkg/kv/kvserver/replica.go
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,8 @@ type Replica struct {
// timestamp, independent of the source.
sideTransportClosedTimestamp sidetransportAccess

checksumStorage checksumStorage

mu struct {
// Protects all fields in the mu struct.
syncutil.RWMutex
Expand Down Expand Up @@ -556,9 +558,6 @@ type Replica struct {
// live node will not lose leaseholdership.
lastUpdateTimes lastUpdateTimesMap

// Computed checksum at a snapshot UUID.
checksums map[uuid.UUID]ReplicaChecksum

// proposalQuota is the quota pool maintained by the lease holder where
// incoming writes acquire quota from a fixed quota pool before going
// through. If there is no quota available, the write is throttled
Expand Down
Loading