Fix flaky DataFormatAwareReplicaGetByIdIT when zero docs are indexed#22365
Open
LantaoJin wants to merge 1 commit into
Open
Fix flaky DataFormatAwareReplicaGetByIdIT when zero docs are indexed#22365LantaoJin wants to merge 1 commit into
LantaoJin wants to merge 1 commit into
Conversation
Signed-off-by: Lantao Jin <ltjin@amazon.com>
Contributor
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
Contributor
|
❕ Gradle check result for f24dd04: UNSTABLE Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #22365 +/- ##
============================================
+ Coverage 73.34% 73.38% +0.04%
- Complexity 76017 76062 +45
============================================
Files 6076 6076
Lines 345507 345508 +1
Branches 49732 49732
============================================
+ Hits 253409 253568 +159
+ Misses 71869 71744 -125
+ Partials 20229 20196 -33 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
mgodwan
approved these changes
Jul 1, 2026
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
testGetByIdFromReplicapicked its document count withrandomInt(20), which is inclusive of 0. On the (~1-in-21) runs where it rolled 0, the test indexed no documents and then failed inassertCatalogSnapshotsConverged(...).With 0 docs, the index only ever produces a
segments_Ncommit file.assertCatalogSnapshotsConvergedcallsassertLuceneIndexDirContents, which — because this suite runs with a Lucene secondary format (hasLuceneSecondary()returnstrue) — asserts the shard'sindex/directory contains segment data files beyondsegments_N(.si, .cfs, etc.). An empty index never writes those, so the assertion tripped:The failure was purely a function of the random seed, making it an intermittent (flaky) failure rather than a real regression in the replica get-by-id path.
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.