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

v2.2: blockstore: Update flaky compaction test (backport of #5131) #5150

Merged
merged 1 commit into from
Mar 6, 2025

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented Mar 5, 2025

Problem

See #4188 for more context, but the TLDR:

  • We have a custom compaction filter that deletes data
  • We have a unit tests that relies on compaction running & deleting this data
  • We have found our unit test is flaky because rocksdb will sometimes no-op when we request a compaction; this is rocksdb functioning as intended but just unfortunate for us. rocksdb was essentially seeing no work to be done in this case

Summary of Changes

Update the compaction call to NOT take start/end keys, which results in the entire column being considered for compaction. This results in a different call path in rocksdb being used which picks up the overlapping data (which signals to run a compaction) every time.

Previously, I could run the failing unit test in a loop and see a failure within ~20 iterations, often times fewer. With this PR, I have run > 500 iterations without failure

This isn't necessarily a perfect solution; however, I think it is a "good enough" solution for now so our team can get back time from flaky CI. RPC will call blockstore functions that check the value of the atomic before proceeding; we could possibly go that route but then this test isn't exercising much more than setting and reading an integer


This is an automatic backport of pull request #5131 done by Mergify.

@mergify mergify bot requested a review from a team as a code owner March 5, 2025 16:23
@mergify mergify bot assigned steviez Mar 5, 2025
Call compact_range_cf() with the begin/end keys set to None in order to
compact the entire range

(cherry picked from commit 760b6fc)
@steviez steviez force-pushed the mergify/bp/v2.2/pr-5131 branch from 1adfbfc to 1b618f9 Compare March 5, 2025 17:48
@t-nelson
Copy link

t-nelson commented Mar 5, 2025

@mergify rebase

Copy link
Author

mergify bot commented Mar 5, 2025

rebase

☑️ Nothing to do

  • any of:
    • #commits > 1 [📌 rebase requirement]
    • #commits-behind > 0 [📌 rebase requirement]
    • -linear-history [📌 rebase requirement]
  • -closed [📌 rebase requirement]
  • -conflict [📌 rebase requirement]
  • queue-position = -1 [📌 rebase requirement]

@steviez
Copy link

steviez commented Mar 5, 2025

mergify rebase

Too slow @t-nelson 😉
image

That force push was simply a rebase, forgot that we can do it with bots. Was going to add you as a reviewer once CI finished, but we're close enough so doing it now

@steviez steviez requested a review from t-nelson March 5, 2025 18:56
@steviez steviez merged commit 3935e9b into v2.2 Mar 6, 2025
46 checks passed
@steviez steviez deleted the mergify/bp/v2.2/pr-5131 branch March 6, 2025 03:55
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