-
Notifications
You must be signed in to change notification settings - Fork 646
[v24.2.x] storage: always schedule adjacent segment compaction #25160
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
base: v24.2.x
Are you sure you want to change the base?
Conversation
c9c6a23
to
1eb7c2d
Compare
Retry command for Build#62227please wait until all jobs are finished before running the slash command
|
CI test resultstest results on build#62227
test results on build#65940
|
The test itself has many steps that make it hard to follow what has happened. Adds some log messages to indicate different steps in the test. (cherry picked from commit 67689fa)
Adds a static constructor to return an optional interval, which per the class comments, should represent an empty interval. I intend on using this for some upcoming bounds checks. (cherry picked from commit 8514bfd)
The methods to find offset range size currently use segment bounds to determine whether a given offset is available to be queried. This doesn't account for the case when the segment set contains offsets that don't fall in the log's offset range (e.g. follow a delete records request that trims mid-segment). This commit adds appropriate bounds checks to both methods. With an upcoming change to merge compact after windowed compaction, test_offset_range_size2_compacted would fail because it would prefix truncate mid-segment following a merge compaction, and then trip over this, hitting an unexpected exception when creating a reader: ``` std::runtime_error: Reader cannot read before start of the log 0 < 887 ``` (cherry picked from commit 69e4666)
CONFLICT: - this branch had code that takes a range instead of just the compaction config for compact_adjacent_segments() We previously fell back on adjacent segment compaction only if there was no new data to compact. In some situations, we've seen the rate of incoming data outpace the compaction interval, causing segments to pile up without ever being merged. This change tweaks the logic to always run adjacent segment compaction after running sliding window compaction. Along the way, a couple tests needed to be tweaked to handle the fact that housekeeping now may merge segments. (cherry picked from commit 08d0433)
1eb7c2d
to
0c7fa1c
Compare
Retry command for Build#65940please wait until all jobs are finished before running the slash command
|
/ci-repeat 1 |
Backport of PR #24874
Also pulls in #24880 which is a dependency of this change
Fixes #24957
Backports Required
Release Notes
Improvements