kvserver: add ability to lazily initialize Raft engine batches#160565
kvserver: add ability to lazily initialize Raft engine batches#160565craig[bot] merged 1 commit intocockroachdb:masterfrom
Conversation
pav-kv
left a comment
There was a problem hiding this comment.
Looks good, LGTMable in the next iteration.
pkg/kv/kvserver/replica_app_batch.go
Outdated
| } | ||
|
|
||
| // Commit the Raft batch to Pebble, if it exists. Note unlike batches to the | ||
| // State engine, we always sync writes to the Raft engine. |
There was a problem hiding this comment.
TODO to revisit how the state engine is synced below? In separated engines mode, we can skip the second sync entirely by design (unless there are some corner cases to yet fix).
There was a problem hiding this comment.
Actually, let's leave this to a subsequent PR. Need to understand some of the commentary here better.
cc857c9 to
d897fb1
Compare
arulajmani
left a comment
There was a problem hiding this comment.
@arulajmani made 6 comments and resolved 1 discussion.
Reviewable status:complete! 0 of 0 LGTMs obtained (waiting on @pav-kv).
pkg/kv/kvserver/replica_app_batch.go
Outdated
| } | ||
|
|
||
| // Commit the Raft batch to Pebble, if it exists. Note unlike batches to the | ||
| // State engine, we always sync writes to the Raft engine. |
There was a problem hiding this comment.
Actually, let's leave this to a subsequent PR. Need to understand some of the commentary here better.
d897fb1 to
b679ae4
Compare
|
TFTR! bors r=pav-kv |
Previously, we were not distinguishing between the State engine and Raft engine when preparing a split. This patch fixes that, by adding the ability to lazily initialize a Raft batch, which will be written to the Raft engine, and passing it to splitPreApply. Epic: none Release note: None
b679ae4 to
494843c
Compare
|
Canceled. |
|
Reverted the comment wrap. bors r=pav-kv |
160565: kvserver: add ability to lazily initialize Raft engine batches r=pav-kv a=arulajmani Previously, we were not distinguishing between the State engine and Raft engine when preparing a split. This patch fixes that, by adding the ability to lazily initialize a Raft batch, which will be written to the Raft engine, and passing it to splitPreApply. Epic: none Release note: None Co-authored-by: Arul Ajmani <arulajmani@gmail.com>
|
Build failed: |
|
bors retry |
Previously, we were not distinguishing between the State engine and Raft engine when preparing a split. This patch fixes that, by adding the ability to lazily initialize a Raft batch, which will be written to the Raft engine, and passing it to splitPreApply.
Epic: none
Release note: None