[analytics-engine] Fix flaky rust test: concurrent_shard_warmup_does_not_corrupt#22327
Open
LantaoJin wants to merge 1 commit into
Open
Conversation
Contributor
PR Reviewer Guide 🔍(Review updated until commit 265b417)Here are some key observations to aid the review process:
|
Contributor
|
❌ Gradle check result for fae79fe: null Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
…not_corrupt Signed-off-by: Lantao Jin <ltjin@amazon.com>
fae79fe to
265b417
Compare
Contributor
|
Persistent review updated to latest commit 265b417 |
Contributor
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #22327 +/- ##
============================================
- Coverage 73.40% 73.37% -0.03%
+ Complexity 76075 76032 -43
============================================
Files 6076 6076
Lines 345500 345500
Branches 49732 49732
============================================
- Hits 253608 253523 -85
- Misses 71707 71755 +48
- Partials 20185 20222 +37 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
FoyerCacheis configured disk-only (.memory(1)— in-memory tier is 1 byte).put_metadata→insert()returns immediately, but the actual write goes through Foyer's async storage flusher. This test fires 5 concurrentput_metadatatasks (the most write-concurrent test in the file), then issuesget()immediately — so under heavy load an entry can still be queued in the write buffer when read, intermittently trippingassert!(cached.is_some()).Fix: Added
cache.wait_for_flush().awaitafter the warmup tasks join and before the verification reads. That method exists for exactly this purpose — its documented post-condition is "all previously put() entries are on SSD and findable via get()." The production cache path is unaffected; this only makes the test's read-after-write deterministic.Related Issues
Resolves #[Issue number to be closed when this PR is merged]
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.