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

[Backport 2.x] Force merge API supports performing only on primary shards (#11269) #12609

Merged

Conversation

gaobinlong
Copy link
Collaborator

@gaobinlong gaobinlong commented Mar 12, 2024

Description

Backport #11269 to 2.x.

Related Issues

#8021

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.

…h-project#11269)

* Force merge API supports performing on primary shards only

Signed-off-by: Gao Binlong <gbinlong@amazon.com>

* Modify change log

Signed-off-by: Gao Binlong <gbinlong@amazon.com>

* Fix test failure

Signed-off-by: Gao Binlong <gbinlong@amazon.com>

* Fix typo

Signed-off-by: Gao Binlong <gbinlong@amazon.com>

* Modify skip version

Signed-off-by: Gao Binlong <gbinlong@amazon.com>

* Add version check and more tests

Signed-off-by: Gao Binlong <gbinlong@amazon.com>

* Format code

Signed-off-by: Gao Binlong <gbinlong@amazon.com>

* Modify supported version and add more test

Signed-off-by: Gao Binlong <gbinlong@amazon.com>

* Change the supported version to 3.0.0

Signed-off-by: Gao Binlong <gbinlong@amazon.com>

* Add test case in SegmentReplicationIT

Signed-off-by: Gao Binlong <gbinlong@amazon.com>

* Optimize the test code

Signed-off-by: Gao Binlong <gbinlong@amazon.com>

---------

Signed-off-by: Gao Binlong <gbinlong@amazon.com>
(cherry picked from commit e6eec36)
Copy link
Contributor

github-actions bot commented Mar 12, 2024

Compatibility status:

Checks if related components are compatible with change 7d1c255

Incompatible components

Incompatible components: [https://github.com/opensearch-project/security-analytics.git]

Skipped components

Compatible components

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

Copy link
Contributor

❌ Gradle check result for 51d9bb3: FAILURE

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?

Signed-off-by: Gao Binlong <gbinlong@amazon.com>
Copy link
Contributor

❌ Gradle check result for a3465d6: FAILURE

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?

Signed-off-by: Gao Binlong <gbinlong@amazon.com>
Copy link
Contributor

❌ Gradle check result for 1340aa8: FAILURE

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?

Signed-off-by: Gao Binlong <gbinlong@amazon.com>
Copy link
Contributor

❌ Gradle check result for e9b194d: FAILURE

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?

@sohami
Copy link
Collaborator

sohami commented Mar 12, 2024

❌ Gradle check result for e9b194d: FAILURE

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?

Failures are related to: #12593

Copy link
Contributor

❕ Gradle check result for e9b194d: UNSTABLE

  • TEST FAILURES:
      1 org.opensearch.repositories.azure.AzureBlobStoreRepositoryTests.testContainerCreationAndDeletion
      1 org.opensearch.backwards.MixedClusterClientYamlTestSuiteIT.test {p0=indices.get_field_mapping/20_missing_field/Return empty object if field doesn't exist, but index does}
      1 org.opensearch.backwards.MixedClusterClientYamlTestSuiteIT.test {p0=indices.forcemerge/20_wait_for_completion/Force merge index with wait_for_completion}

Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure.

Copy link

codecov bot commented Mar 13, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 5 lines in your changes are missing coverage. Please review.

Project coverage is 71.15%. Comparing base (0dd892c) to head (7d1c255).
Report is 11 commits behind head on 2.x.

Files Patch % Lines
.../indices/forcemerge/TransportForceMergeAction.java 0.00% 3 Missing ⚠️
...n/indices/forcemerge/ForceMergeRequestBuilder.java 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##                2.x   #12609      +/-   ##
============================================
- Coverage     71.28%   71.15%   -0.13%     
+ Complexity    60145    60084      -61     
============================================
  Files          4957     4957              
  Lines        282799   282834      +35     
  Branches      41409    41414       +5     
============================================
- Hits         201591   201264     -327     
- Misses        64189    64577     +388     
+ Partials      17019    16993      -26     

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

@sohami
Copy link
Collaborator

sohami commented Mar 13, 2024

❕ Gradle check result for e9b194d: UNSTABLE

  • TEST FAILURES:
      1 org.opensearch.repositories.azure.AzureBlobStoreRepositoryTests.testContainerCreationAndDeletion
      1 org.opensearch.backwards.MixedClusterClientYamlTestSuiteIT.test {p0=indices.get_field_mapping/20_missing_field/Return empty object if field doesn't exist, but index does}
      1 org.opensearch.backwards.MixedClusterClientYamlTestSuiteIT.test {p0=indices.forcemerge/20_wait_for_completion/Force merge index with wait_for_completion}

Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure.

@gaobinlong It looks like below test is flaky. Can you check this please ?

>       1 org.opensearch.backwards.MixedClusterClientYamlTestSuiteIT.test {p0=indices.forcemerge/20_wait_for_completion/Force merge index with wait_for_completion}

Signed-off-by: Gao Binlong <gbinlong@amazon.com>
Signed-off-by: Gao Binlong <gbinlong@amazon.com>
Copy link
Contributor

❌ Gradle check result for a25b43d: FAILURE

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?

Copy link
Contributor

❕ Gradle check result for 83fb554: UNSTABLE

  • TEST FAILURES:
      1 org.opensearch.backwards.MixedClusterClientYamlTestSuiteIT.test {p0=indices.get_field_mapping/20_missing_field/Return empty object if field doesn't exist, but index does}

Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure.

@gaobinlong
Copy link
Collaborator Author

❕ Gradle check result for 83fb554: UNSTABLE

  • TEST FAILURES:
      1 org.opensearch.backwards.MixedClusterClientYamlTestSuiteIT.test {p0=indices.get_field_mapping/20_missing_field/Return empty object if field doesn't exist, but index does}

Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure.

The failed test seems not related to this PR, and there's an issue tracking it but seems we haven't resolved it yet.

Copy link
Contributor

❌ Gradle check result for 7d1c255: FAILURE

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?

Copy link
Contributor

❕ Gradle check result for 7d1c255: UNSTABLE

  • TEST FAILURES:
      1 org.opensearch.remotestore.SegmentReplicationUsingRemoteStoreIT.testRestartPrimary_NoReplicas

Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure.

@sohami
Copy link
Collaborator

sohami commented Mar 13, 2024

❕ Gradle check result for 7d1c255: UNSTABLE

  • TEST FAILURES:
      1 org.opensearch.remotestore.SegmentReplicationUsingRemoteStoreIT.testRestartPrimary_NoReplicas

Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure.

Known issue: #11993

@sohami sohami merged commit 0dfc846 into opensearch-project:2.x Mar 13, 2024
30 of 31 checks passed
@sohami
Copy link
Collaborator

sohami commented Mar 13, 2024

@gaobinlong We will need a forward port to change the version checks in main branch. Also probably we can update the yml tests as done in this PR. Can you also create a documentation issue or PR for this new option ?

@sohami sohami added the documentation pending Tracks issues which have PRs merged but documentation changes pending label Mar 13, 2024
@gaobinlong
Copy link
Collaborator Author

@gaobinlong We will need a forward port to change the version checks in main branch. Also probably we can update the yml tests as done in this PR. Can you also create a documentation issue or PR for this new option ?

Thanks, I'll create a following PR for the main branch, and both of the related document issue and PR have been created yet.

@gaobinlong gaobinlong deleted the backport/backport-11269-to-2.x branch June 19, 2024 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation pending Tracks issues which have PRs merged but documentation changes pending
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants