Skip to content

Commit 886c4d6

Browse files
committed
keys: scope unreplicated raft and state machine
Epic: none Release note: none
1 parent 934a86d commit 886c4d6

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pkg/keys/doc.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,16 @@ var schema = [...]interface{}{
192192
// pertain to just one replica of a range. They are unreplicated and
193193
// unaddressable. The typical example is the Raft log. They all share
194194
// `LocalRangeIDPrefix` and `localRangeIDUnreplicatedInfix`.
195+
//
196+
// WARNING: when adding a new key in this section, decide whether it should be
197+
// classified as "raft" or "state machine" key, correspondingly to which
198+
// engine it resides in:
199+
//
200+
// - keys <= RangeTombstoneKey in this prefix are "state machine" engine keys
201+
// - keys > RangeTombstoneKey in this prefix are "raft" engine keys
202+
// - historical exception: RaftReplicaIDKey belongs to the state machine
203+
//
204+
// Failure to classify may result in replica state corruption in storage.
195205
localRangeIDUnreplicatedInfix, // "u"
196206
RangeTombstoneKey, // "rftb"
197207
RaftHardStateKey, // "rfth"

0 commit comments

Comments
 (0)