File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed
pkg/kv/kvserver/kvstorage Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -135,16 +135,10 @@ func CreateUninitializedReplica(
135
135
136
136
// Write the RaftReplicaID for this replica. This is the only place in the
137
137
// CockroachDB code that we are creating a new *uninitialized* replica.
138
- // Note that it is possible that we have already created the HardState for
139
- // an uninitialized replica, then crashed, and on recovery are receiving a
140
- // raft message for the same or later replica.
141
- // - Same replica: we are overwriting the RaftReplicaID with the same
142
- // value, which is harmless.
143
- // - Later replica: there may be an existing HardState for the older
144
- // uninitialized replica with Commit=0 and non-zero Term and Vote. Using
145
- // the Term and Vote values for that older replica in the context of
146
- // this newer replica is harmless since it just limits the votes for
147
- // this replica.
138
+ //
139
+ // Before this point, raft and state machine state of this replica are
140
+ // non-existent. The only RangeID-specific key that can be present is the
141
+ // RangeTombstone inspected above.
148
142
_ = CreateUninitReplicaTODO
149
143
if err := sl .SetRaftReplicaID (ctx , eng , replicaID ); err != nil {
150
144
return err
You can’t perform that action at this time.
0 commit comments