Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PartitionClient may silently read from replica #147

Open
crepererum opened this issue Jul 14, 2022 · 1 comment
Open

PartitionClient may silently read from replica #147

crepererum opened this issue Jul 14, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@crepererum
Copy link
Collaborator

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"),
));
}

@crepererum crepererum added the bug Something isn't working label Jul 14, 2022
@alamb
Copy link
Contributor

alamb commented Jul 14, 2022

"we saw this happen on our production system at InfluxData" so it is not a theoretical issue ;)

crepererum added a commit that referenced this issue Jul 14, 2022
Newer versions of Redpanda do not require the `OffsetOutOfBounds`
quirk anymore, so let's remove it. See #147 on why this is a good idea.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants