We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3b44c52 commit af4a003Copy full SHA for af4a003
pkg/kv/kvserver/replica_application_state_machine.go
@@ -143,6 +143,9 @@ func (sm *replicaStateMachine) NewBatch() apply.Batch {
143
// make it safer.
144
b.r = r
145
b.applyStats = &sm.applyStats
146
+ // TODO(#144627): most commands do not need to read. Use NewWriteBatch because
147
+ // it is more efficient. If there are exceptions, sparingly use NewReader or
148
+ // NewBatch (if it needs to read its own writes, which is unlikely).
149
b.batch = r.store.TODOEngine().NewBatch()
150
r.mu.RLock()
151
b.state = r.shMu.state
0 commit comments