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

[Segment Replication] Fix flaky test org.opensearch.indices.replication.SegmentReplicationSuiteIT #10721

Closed
wants to merge 6 commits into from

Conversation

Rishikesh1159
Copy link
Member

Description

This PR fixes flaky test org.opensearch.indices.replication.SegmentReplicationSuiteIT by moving index creation out of setup.

Related Issues

Resolves #9499

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • 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.

Signed-off-by: Rishikesh1159 <rishireddy1159@gmail.com>
@github-actions github-actions bot added bug Something isn't working flaky-test Random test failure that succeeds on second run Indexing:Replication Issues and PRs related to core replication framework eg segrep v2.11.0 Issues and PRs related to version 2.11.0 labels Oct 18, 2023
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

Signed-off-by: Rishikesh1159 <rishireddy1159@gmail.com>
@github-actions
Copy link
Contributor

github-actions bot commented Oct 18, 2023

Compatibility status:

Checks if related components are compatible with change 7850dc8

Incompatible components

Skipped components

Compatible components

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

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@gbbafna
Copy link
Collaborator

gbbafna commented Oct 19, 2023

* What went wrong:
Execution failed for task ':distribution:bwc:staged:buildBwcLinuxTar'.
> Building 2.11.0 didn't generate expected file /var/jenkins/workspace/gradle-check/search/distribution/bwc/staged/build/bwc/checkout-2.11/distribution/archives/linux-tar/build/distributions/opensearch-min-2.11.0-SNAPSHOT-linux-x64.tar.gz

@mch2
Copy link
Member

mch2 commented Oct 19, 2023

@Rishikesh1159 How was createIndex in setup causing failures?

@Rishikesh1159
Copy link
Member Author

Rishikesh1159 commented Oct 19, 2023

@Rishikesh1159 How was createIndex in setup causing failures?

@mch2 I was not able to repro this but from the logs I see errors might be happening because of index not being closed, few errors from logs seems like they are affect of previous test's operation. I don't have conclusive evidence that this would resolve as it is not reproducible so added test logging to catch this if it happens next time.

@mch2
Copy link
Member

mch2 commented Oct 19, 2023

@Rishikesh1159 How was createIndex in setup causing failures?

@mch2 I was not able to repro this but from the logs I see errors might be happening because of index not being closed, few errors from logs seems like they are affect of previous test's operation. I don't have conclusive evidence that this would resolve as it is not reproducible so added test logging to catch this if it happens next time.

This doesn't make much sense to me, @Before is executed before each test, and with suite scope the indices are all wiped in an @After test.

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@codecov
Copy link

codecov bot commented Oct 19, 2023

Codecov Report

Attention: 165 lines in your changes are missing coverage. Please review.

Comparison is base (36bd674) 71.27% compared to head (7850dc8) 71.44%.
Report is 7 commits behind head on main.

Files Patch % Lines
...org/opensearch/index/mapper/NumberFieldMapper.java 43.62% 61 Missing and 23 partials ⚠️
.../document/SortedUnsignedLongDocValuesSetQuery.java 15.09% 43 Missing and 2 partials ⚠️
.../main/java/org/apache/lucene/util/LongHashSet.java 39.62% 21 Missing and 11 partials ⚠️
...ch/common/xcontent/JsonToStringXContentParser.java 81.25% 1 Missing and 2 partials ⚠️
.../org/opensearch/http/netty4/Netty4HttpChannel.java 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #10721      +/-   ##
============================================
+ Coverage     71.27%   71.44%   +0.17%     
- Complexity    59176    59316     +140     
============================================
  Files          4909     4911       +2     
  Lines        278429   278666     +237     
  Branches      40460    40528      +68     
============================================
+ Hits         198443   199095     +652     
+ Misses        63528    63018     -510     
- Partials      16458    16553      +95     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@peternied peternied self-assigned this Nov 2, 2023
import org.junit.Before;

@OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.SUITE, minNumDataNodes = 2)
@TestLogging(reason = "Getting trace logs from replication package", value = "org.opensearch.indices.replication:TRACE")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am happy to merge a change that adds more logging so we can better root cause a source of failure; however, I don't think the others changes should be merged.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 - @Rishikesh1159 mind making this update and we can add the test logging?

@opensearch-trigger-bot
Copy link
Contributor

This PR is stalled because it has been open for 30 days with no activity.

@opensearch-trigger-bot opensearch-trigger-bot bot added the stalled Issues that have stalled label Dec 3, 2023
Copy link
Contributor

github-actions bot commented Jan 5, 2024

✅ Gradle check result for 7850dc8: SUCCESS

@opensearch-trigger-bot opensearch-trigger-bot bot removed the stalled Issues that have stalled label Jan 5, 2024
@mch2
Copy link
Member

mch2 commented Jan 29, 2024

closing this in favor of #11977

@mch2 mch2 closed this Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working flaky-test Random test failure that succeeds on second run Indexing:Replication Issues and PRs related to core replication framework eg segrep skip-changelog v2.11.0 Issues and PRs related to version 2.11.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Test org.opensearch.indices.replication.SegmentReplicationSuiteIT is flaky
7 participants