Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
r/consensus: do not advance last visible offset beyond majority repli…
…cated When Raft handles replicate requests of mixed consistency levels it has to separately track the visibility of both type of replicate requests. i.e. `quorum_ack` requests should not be visible to readers until they are successfully replicated and flushed on the majority of nodes while for `leader_ack` requests it is enough to have them acknowledged and not flushed by majority of nodes. When `quorum_ack` batch is committed then all subsequent majority replicated `leader_ack` batches may become immediately visible to consumers if they are majority confirmed. Fixed bug in Raft where the majority replication wasn't validated correctly and 'dirty' batches were made visible to the consumer. It might lead to situation in which consumer read batches which were then not available on newly elected leader. Signed-off-by: Michal Maslanka <michal@redpanda.com>
- Loading branch information