-
Notifications
You must be signed in to change notification settings - Fork 593
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
rm_stm/tests: add test for producer expiration without data batches #18247
rm_stm/tests: add test for producer expiration without data batches #18247
Conversation
23.3.x backport (with additional fix): #18248 |
fragmented_vector<model::producer_identity> | ||
rm_stm::get_expired_producers() const { | ||
fragmented_vector<model::producer_identity> result; | ||
auto pids = std::views::keys(_log_state.ongoing_map); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are we certain that using std::ranges
is now blessed ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Judging from https://libcxx.llvm.org/Status/Cxx20.html ranges support should be good in clang 16.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Though I don't find this any more readable than a for loop :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see references to ranges elsewhere in the code.. I agree it is not any more readable than a range for but opens up possibilities to use std functions like find_if and such.
no logic changes, just refactoring
In earlier versions we were not considering transactions without data batches as candidates for expiry, thats not the case any more with redpanda-data#18076, adding a regression test to future proof.
85d75b0
to
565c182
Compare
Failure |
/backport v24.1.x |
/backport v23.3.x |
/backport v23.2.x |
Failed to create a backport PR to v23.3.x branch. I tried:
|
Failed to create a backport PR to v23.2.x branch. I tried:
|
Failed to create a backport PR to v24.1.x branch. I tried:
|
In earlier versions we were not considering transactions without data
batches as candidates for expiry, thats not the case any more with
#18076, adding a regression test to future proof.
Backports Required
Release Notes