Skip to content

Commit

Permalink
Merge pull request #12627 from mmaslankaprv/consensus-committed-offse…
Browse files Browse the repository at this point in the history
…t-fix

Use `_flushed_offset` instead of `log::committed_offset`
  • Loading branch information
mmaslankaprv authored Aug 8, 2023
2 parents fae2d4d + 443c857 commit a7f0f8b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/v/raft/consensus.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1500,7 +1500,7 @@ ss::future<> consensus::write_last_applied(model::offset o) {
* In order to keep an invariant that: 'last applied offset MUST be
* readable' we limit it here to committed (leader flushed) offset.
*/
auto const limited_offset = std::min(o, _log->offsets().committed_offset);
auto const limited_offset = std::min(o, _flushed_offset);
auto key = last_applied_key();
iobuf val = reflection::to_iobuf(limited_offset);
return _storage.kvs().put(
Expand Down

0 comments on commit a7f0f8b

Please sign in to comment.