Skip to content

Fix flaky test RemoteIndexShardtests.testRepicaCleansUpOldCommitsWhenReceivingNew#11111

Merged
dreamer-89 merged 1 commit intoopensearch-project:mainfrom
mch2:10303
Nov 6, 2023
Merged

Fix flaky test RemoteIndexShardtests.testRepicaCleansUpOldCommitsWhenReceivingNew#11111
dreamer-89 merged 1 commit intoopensearch-project:mainfrom
mch2:10303

Conversation

@mch2
Copy link
Copy Markdown
Member

@mch2 mch2 commented Nov 6, 2023

Description

Recent failures in this test are due to a hardcoded assertion on the segments file name.

org.junit.ComparisonFailure: expected:<segments_[5]> but was:<segments_[6]>

I haven't been able to reproduce this locally, but the replica must be performing an additional commit in the background before replication.

This test's purpose is to ensure old commits are cleaned up and we don't care what the actual generation value is. Made an update here to expect that we only have a single segments file and its gen is higher than the previous.

Related Issues

Resolves #10303

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Failing checks are inspected and point to the corresponding known issue(s) (See: Troubleshooting Failing Builds)
  • Commits are signed per the DCO using --signoff
  • Commit changes are listed out in CHANGELOG.md file (See: Changelog)
  • Public documentation issue/PR created

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.

…ReceivingNew

Signed-off-by: Marc Handalian <marc.handalian@gmail.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Nov 6, 2023

Compatibility status:

Checks if related components are compatible with change f0a3902

Incompatible components

Incompatible components: [https://github.com/opensearch-project/performance-analyzer.git]

Skipped components

Compatible components

Compatible components: [https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/reporting.git, https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/custom-codecs.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/neural-search.git]

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Nov 6, 2023

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.remotestore.RemoteStoreStatsIT.testNonZeroPrimaryStatsOnNewlyCreatedIndexWithZeroDocs
      1 org.opensearch.index.shard.RemoteStoreRefreshListenerTests.testAfterCommit

@codecov
Copy link
Copy Markdown

codecov bot commented Nov 6, 2023

Codecov Report

Merging #11111 (f0a3902) into main (747f7d1) will increase coverage by 0.12%.
Report is 2 commits behind head on main.
The diff coverage is n/a.

@@             Coverage Diff              @@
##               main   #11111      +/-   ##
============================================
+ Coverage     71.20%   71.33%   +0.12%     
- Complexity    58716    58836     +120     
============================================
  Files          4872     4872              
  Lines        276773   276773              
  Branches      40240    40240              
============================================
+ Hits         197078   197436     +358     
+ Misses        63238    62859     -379     
- Partials      16457    16478      +21     

see 455 files with indirect coverage changes

@mch2 mch2 added the backport 2.x Backport to 2.x branch label Nov 6, 2023
@mch2
Copy link
Copy Markdown
Member Author

mch2 commented Nov 6, 2023

RemoteStoreRefreshListenerTests

#8947
#10983

@dreamer-89 dreamer-89 merged commit 3bbc495 into opensearch-project:main Nov 6, 2023
opensearch-trigger-bot bot pushed a commit that referenced this pull request Nov 6, 2023
…ReceivingNew (#11111)

Signed-off-by: Marc Handalian <marc.handalian@gmail.com>
(cherry picked from commit 3bbc495)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
mch2 pushed a commit that referenced this pull request Nov 7, 2023
…ReceivingNew (#11111) (#11116)

(cherry picked from commit 3bbc495)

Signed-off-by: Marc Handalian <marc.handalian@gmail.com>
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>
rayshrey pushed a commit to rayshrey/OpenSearch that referenced this pull request Mar 18, 2024
…ReceivingNew (opensearch-project#11111)

Signed-off-by: Marc Handalian <marc.handalian@gmail.com>
shiv0408 pushed a commit to Gaurav614/OpenSearch that referenced this pull request Apr 25, 2024
…ReceivingNew (opensearch-project#11111)

Signed-off-by: Marc Handalian <marc.handalian@gmail.com>
Signed-off-by: Shivansh Arora <hishiv@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport 2.x Backport to 2.x branch bug Something isn't working flaky-test Random test failure that succeeds on second run skip-changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] o.o.i.s.RemoteIndexShardTests.testRepicaCleansUpOldCommitsWhenReceivingNew is flaky

2 participants