Skip to content

Commit

Permalink
kvserver: remove unused snapshot log entry code
Browse files Browse the repository at this point in the history
We used to have to send the raft log along with snapshots as a result of
(in the olden days) requiring all replicas to agree on the truncated
state. This hasn't been (generally) true as of v19.1 (cockroachdb#35701), though it
was still a possibility until v22.1 (cockroachdb#58088). This commit removes the
corresponding code.

Release note: None
  • Loading branch information
tbg committed Nov 2, 2021
1 parent f69253e commit d63c402
Show file tree
Hide file tree
Showing 5 changed files with 92 additions and 502 deletions.
214 changes: 81 additions & 133 deletions pkg/kv/kvserver/raft.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 2 additions & 5 deletions pkg/kv/kvserver/raft.proto
Original file line number Diff line number Diff line change
Expand Up @@ -195,12 +195,9 @@ message SnapshotRequest {
// A RocksDB BatchRepr. Multiple kv_batches may be sent across multiple request messages.
bytes kv_batch = 2 [(gogoproto.customname) = "KVBatch"];

// These are really raftpb.Entry, but we model them as raw bytes to avoid
// roundtripping through memory. They are separate from the kv_batch to
// allow flexibility in log implementations.
repeated bytes log_entries = 3;

bool final = 4;

reserved 3;
}

message SnapshotResponse {
Expand Down
Loading

0 comments on commit d63c402

Please sign in to comment.