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

storage/tests: Adjust step size deviation used in test #18420

Conversation

abhijat
Copy link
Contributor

@abhijat abhijat commented May 13, 2024

In the e2e storage test the index step size of 32KiB is used as possible deviation from expected results. An allowance of 50KiB is used to prevent the test failing because of index step size.

The change computes max step size across all segment indices and uses that as the deviation.

FIXES #18396

Backports Required

  • none - not a bug fix
  • none - this is a backport
  • none - issue does not exist in previous branches
  • none - papercut/not impactful enough to backport
  • v24.1.x
  • v23.3.x
  • v23.2.x

Release Notes

  • none

In the e2e storage test the index step size of 32KiB is used as possible
deviance from expected results. An allowance of 50KiB is used to prevent
the test failing because of index step size.

The change computes max step size across all segment indices and uses
that as the deviance.
@abhijat abhijat changed the title storage/tests: Adjust step size deviance used in test storage/tests: Adjust step size deviation used in test May 13, 2024
@abhijat abhijat requested a review from Lazin May 13, 2024 09:39
auto& pos = _index._state.position_index;
diffs.reserve(pos.size());
std::adjacent_difference(
pos.begin(), pos.end(), std::back_inserter(diffs));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

didn't know about adjacent_difference, cool

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately it does not work on const references to containers, but handy where usable.

@piyushredpanda
Copy link
Contributor

Known failure: #13275

@piyushredpanda piyushredpanda merged commit b560351 into redpanda-data:dev May 13, 2024
17 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CI Failure (size overshoot) in storage_e2e_single_thread_rpunit::test_offset_range_size_incremental
3 participants