File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -101,6 +101,17 @@ func (r LoadedReplicaState) check(storeID roachpb.StoreID) error {
101
101
return nil
102
102
}
103
103
104
+ // CreateUninitReplicaTODO is the plan for splitting CreateUninitializedReplica
105
+ // into cross-engine writes.
106
+ //
107
+ // 1. Log storage write (durable):
108
+ // 1.1. Write WAG node with the state machine mutation (2).
109
+ // 2. State machine mutation:
110
+ // 2.1. Write RaftReplicaID with the new ReplicaID/LogID.
111
+ //
112
+ // TODO(sep-raft-log): support the status quo in which only 2.1 is written.
113
+ const CreateUninitReplicaTODO = 0
114
+
104
115
// CreateUninitializedReplica creates an uninitialized replica in storage.
105
116
// Returns kvpb.RaftGroupDeletedError if this replica can not be created
106
117
// because it has been deleted.
@@ -134,6 +145,7 @@ func CreateUninitializedReplica(
134
145
// the Term and Vote values for that older replica in the context of
135
146
// this newer replica is harmless since it just limits the votes for
136
147
// this replica.
148
+ _ = CreateUninitReplicaTODO
137
149
if err := sl .SetRaftReplicaID (ctx , eng , replicaID ); err != nil {
138
150
return err
139
151
}
Original file line number Diff line number Diff line change @@ -203,6 +203,7 @@ func (s *Store) tryGetOrCreateReplica(
203
203
// be accessed by someone holding a reference to, or currently creating a
204
204
// Replica for this rangeID, and that's us.
205
205
206
+ _ = kvstorage .CreateUninitReplicaTODO
206
207
if err := kvstorage .CreateUninitializedReplica (
207
208
// TODO(sep-raft-log): needs both engines due to tombstone (which lives on
208
209
// statemachine).
You can’t perform that action at this time.
0 commit comments