-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Fix flaky test NRTReplicationEngineTests.testPreserveLatestCommit #9378
Conversation
Signed-off-by: Marc Handalian <[email protected]>
Compatibility status:Checks if related components are compatible with change b58bec4 Incompatible componentsIncompatible components: [https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/security-analytics.git] Skipped componentsCompatible componentsCompatible components: [https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/reporting.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/performance-analyzer.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git] |
Gradle Check (Jenkins) Run Completed with:
|
Codecov Report
@@ Coverage Diff @@
## main #9378 +/- ##
============================================
- Coverage 71.19% 71.17% -0.02%
+ Complexity 57455 57451 -4
============================================
Files 4777 4777
Lines 270712 270712
Branches 39566 39566
============================================
- Hits 192729 192690 -39
- Misses 61782 61783 +1
- Partials 16201 16239 +38 |
Mentioned under cancellation failures here: #7357 |
) Signed-off-by: Marc Handalian <[email protected]> (cherry picked from commit 8255050) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
) (#9400) (cherry picked from commit 8255050) Signed-off-by: Marc Handalian <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…ensearch-project#9378) Signed-off-by: Marc Handalian <[email protected]>
…ensearch-project#9378) Signed-off-by: Marc Handalian <[email protected]> Signed-off-by: Kiran Reddy <[email protected]>
…ensearch-project#9378) Signed-off-by: Marc Handalian <[email protected]> Signed-off-by: Kaushal Kumar <[email protected]>
…ensearch-project#9378) Signed-off-by: Marc Handalian <[email protected]> Signed-off-by: Ivan Brusic <[email protected]>
…ensearch-project#9378) Signed-off-by: Marc Handalian <[email protected]> Signed-off-by: Shivansh Arora <[email protected]>
Description
Fix flaky test NRTReplicationEngineTests.testPreserveLatestCommit.
This test occasionally failed when the primary's engine performed a flush and merge behind the scenes. The test would assert against a specific refCount on committed files with a value of 2 - one for being part of the replica's latest commit and one for being active on the reader. With the unexpected merge, the files will not be part of the latest infos on the reader but still be part of the replica's latest commit point, leaving the files referenced once. I've changed this to instead assert referenced vs unreferenced instead of the specific refCount so that the test can handle the random merges. Further cleaned this up so assertions include a refCount check and to validate the files exist in the directory.
I've run this ~5k times now without failure, was able to repro before this every 100-200 runs.
Related Issues
Resolves #9356
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.