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

Tiered compaction: fix early exit check in main loop #7702

Merged
merged 2 commits into from
May 10, 2024

Conversation

arpad-m
Copy link
Member

@arpad-m arpad-m commented May 10, 2024

The old test based on the immutable target_file_size that was a parameter to the function.

It makes no sense to go further once current_level_target_height has reached u64::MAX, as lsn's are u64 typed. In practice, we should only run into this if there is a bug, as the practical lsn range usually ends much earlier.

Testing on target_file_size makes less sense, it basically implements a mode where you turn off the loop and only run one iteration of it. @hlinnaka agrees that current_level_target_height is better here.

Part of #7554

@arpad-m arpad-m requested a review from hlinnaka May 10, 2024 15:00
this usually indicates a bug
@arpad-m arpad-m marked this pull request as ready for review May 10, 2024 15:02
@arpad-m arpad-m requested a review from a team as a code owner May 10, 2024 15:02
@arpad-m arpad-m requested a review from problame May 10, 2024 15:02
@arpad-m arpad-m enabled auto-merge (squash) May 10, 2024 15:11
@arpad-m arpad-m changed the title Tiered compaction: fix early exit test in main loop Tiered compaction: fix early exit check in main loop May 10, 2024
@arpad-m arpad-m disabled auto-merge May 10, 2024 15:11
@arpad-m arpad-m enabled auto-merge (squash) May 10, 2024 15:12
Copy link

3024 tests run: 2891 passed, 0 failed, 133 skipped (full report)


Flaky tests (3)

Postgres 16

  • test_synthetic_size_while_deleting: release

Postgres 15

  • test_partial_evict_tenant[relative_equal]: release

Postgres 14

  • test_lock_time_tracing: debug

Code coverage* (full report)

  • functions: 31.4% (6322 of 20142 functions)
  • lines: 47.3% (47651 of 100831 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
9455022 at 2024-05-10T15:49:13.116Z :recycle:

@arpad-m arpad-m merged commit d7c68dc into main May 10, 2024
53 of 54 checks passed
@arpad-m arpad-m deleted the arpad/compaction_current_level_target_height branch May 10, 2024 15:50
a-masterov pushed a commit that referenced this pull request May 20, 2024
The old test based on the immutable `target_file_size` that was a
parameter to the function.

It makes no sense to go further once `current_level_target_height` has
reached `u64::MAX`, as lsn's are u64 typed. In practice, we should only
run into this if there is a bug, as the practical lsn range usually ends
much earlier.

Testing on `target_file_size` makes less sense, it basically implements
an invocation mode that turns off the looping and only runs one
iteration of it.
@hlinnaka agrees that `current_level_target_height` is better here.

Part of #7554
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