Skip to content

PartitionClient may silently read from replica #147

@crepererum

Description

@crepererum

When a cluster re-balances, the existing partition leader may become a replica, but will not actively report that to the PartitionClient. Even worse, the read lag may trigger this Redpanda quirk even under Kafka:

// Redpanda never sends OffsetOutOfRange even when it should. "Luckily" it does not support deletions so we can
// implement a simple heuristic.
if partition.high_watermark.0 < offset {
warn!(
"This message looks like Redpanda wants to report a OffsetOutOfRange but doesn't."
);
return Err(Error::ServerError(
ProtocolError::OffsetOutOfRange,
String::from("Offset out of range"),
));
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions