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

crash instantly on data loss errors #56

Merged
merged 1 commit into from
Jan 6, 2025
Merged

Conversation

nvartolomei
Copy link
Contributor

@nvartolomei nvartolomei commented Oct 15, 2024

crash instantly on data loss errors

We (@nvartolomei and @bash) found that GroupReadWorker wouldn't report
data loss. The reason is that we didn't fail the test instantly when
data loss is detected instead we relied on monotonicity validation to
fail. I.e. we would crash when we detected that we would consume an
earlier offset compared to what we consumed before.

In the GroupReadWorker we reset the monotonicity validation state on any
errors because the next attempt at consuming is almost certain to read
the second time offsets already consumed. As a result we wouldn't catch
monotonicity issues.

In retrospect, it would have been better to fail instantly when franz-go
detects data loss. So this commit achieves exactly that.

@nvartolomei nvartolomei changed the title crash instantly on data loss crash instantly on data loss errors Oct 16, 2024
nvartolomei added a commit to nvartolomei/redpanda that referenced this pull request Oct 16, 2024
See kgo PR for additional details redpanda-data/kgo-verifier#56
nvartolomei added a commit to nvartolomei/redpanda that referenced this pull request Oct 16, 2024
See kgo PR for additional details redpanda-data/kgo-verifier#56
@dotnwat
Copy link
Member

dotnwat commented Oct 16, 2024

i realize this is draft i didn't intend to hit approve, but it also looked ok.

@dotnwat dotnwat requested a review from andrwng October 16, 2024 21:01
@nvartolomei nvartolomei marked this pull request as ready for review October 17, 2024 10:49
@bashtanov
Copy link
Contributor

I suspect false positives on data loss in franz-go https://github.com/twmb/franz-go/blob/master/pkg/kgo/consumer.go#L2283, so I'll check with Travis.

@dotnwat
Copy link
Member

dotnwat commented Oct 17, 2024

I suspect false positives on data loss in franz-go https://github.com/twmb/franz-go/blob/master/pkg/kgo/consumer.go#L2283, so I'll check with Travis.

@bashtanov @nvartolomei what's the status on this pr?

@bashtanov
Copy link
Contributor

Most probably the failures are not related to franz-go, so let's merge it

@dotnwat
Copy link
Member

dotnwat commented Oct 18, 2024

@nvartolomei ping

@nvartolomei
Copy link
Contributor Author

nvartolomei commented Oct 18, 2024 via email

@nvartolomei nvartolomei force-pushed the nv/crash-data-loss branch 2 times, most recently from 7f0f3a9 to 8ac4000 Compare November 28, 2024 14:23
nvartolomei added a commit to nvartolomei/redpanda that referenced this pull request Nov 28, 2024
See kgo PR for additional details redpanda-data/kgo-verifier#56
nvartolomei added a commit to nvartolomei/redpanda that referenced this pull request Nov 29, 2024
See kgo PR for additional details redpanda-data/kgo-verifier#56
We (nvartolomei and bash) found that GroupReadWorker wouldn't report
data loss. The reason is that we didn't fail the test instantly when
data loss is detected instead we relied on monotonicity validation to
fail. I.e. we would crash when we detected that we would consume an
earlier offset compared to what we consumed before.

In the GroupReadWorker we reset the monotonicity validation state on any
errors because the next attempt at consuming is almost certain to read
the second time offsets already consumed. As a result we wouldn't catch
monotonicity issues.

In retrospect, it would have been better to fail instantly when franz-go
detects data loss. So this commit achieves exactly that.
nvartolomei added a commit to nvartolomei/redpanda that referenced this pull request Dec 16, 2024
See kgo PR for additional details redpanda-data/kgo-verifier#56
@nvartolomei nvartolomei requested a review from bashtanov January 6, 2025 10:11
@nvartolomei nvartolomei merged commit 8c57630 into main Jan 6, 2025
2 checks passed
nvartolomei added a commit to nvartolomei/redpanda that referenced this pull request Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants