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] [Remote Store] Replace overriding mockInternalEngine() in test classes with NRTReplicationEngine. #11716

Merged

Conversation

Rishikesh1159
Copy link
Member

@Rishikesh1159 Rishikesh1159 commented Jan 3, 2024

Description

This PR Conditionally(When segment replication is enabled and shard is replica) returns NRTReplicationEngine() from MockEngineFactory

Related Issues

Resolves #11715

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.

…cationEngine.

Signed-off-by: Rishikesh1159 <rishireddy1159@gmail.com>
@github-actions github-actions bot added enhancement Enhancement or improvement to existing feature or request Indexing:Replication Issues and PRs related to core replication framework eg segrep labels Jan 3, 2024
Signed-off-by: Rishikesh1159 <rishireddy1159@gmail.com>
Copy link
Contributor

github-actions bot commented Jan 3, 2024

Compatibility status:

Checks if related components are compatible with change 86f23ee

Incompatible components

Skipped components

Compatible components

Compatible components: [https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/reporting.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git, https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/custom-codecs.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/geospatial.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]

Copy link
Contributor

github-actions bot commented Jan 3, 2024

❌ Gradle check result for 365019c: 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

github-actions bot commented Jan 3, 2024

❕ Gradle check result for 8d30381: UNSTABLE

  • TEST FAILURES:
      1 org.opensearch.smoketest.SmokeTestMultiNodeClientYamlTestSuiteIT.test {yaml=search.aggregation/20_terms/string profiler via global ordinals}
      1 org.opensearch.remotestore.RemoteStoreStatsIT.testDownloadStatsCorrectnessSinglePrimaryMultipleReplicaShards
      1 org.opensearch.remotestore.RemoteIndexPrimaryRelocationIT.testPrimaryRelocationWhileIndexing

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 Jan 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (c52d4a3) 71.46% compared to head (86f23ee) 71.36%.
Report is 11 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main   #11716      +/-   ##
============================================
- Coverage     71.46%   71.36%   -0.10%     
+ Complexity    59234    59232       -2     
============================================
  Files          4907     4907              
  Lines        278249   278249              
  Branches      40428    40428              
============================================
- Hits         198849   198580     -269     
- Misses        62850    63213     +363     
+ Partials      16550    16456      -94     

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

Copy link
Member

@mch2 mch2 left a comment

Choose a reason for hiding this comment

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

This LGTM overall. For the tests that you are removing the override, can you run pls them a few times for sanity? To this point they have never had a mock IE and don't want to add flakiness.

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

github-actions bot commented Jan 3, 2024

❌ Gradle check result for cc294a8: 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

github-actions bot commented Jan 4, 2024

✅ Gradle check result for cc294a8: SUCCESS

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

github-actions bot commented Jan 5, 2024

❕ Gradle check result for 86f23ee: UNSTABLE

  • TEST FAILURES:
      1 org.opensearch.remotestore.RemoteIndexPrimaryRelocationIT.testPrimaryRelocationWhileIndexing

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

@andrross andrross merged commit 3a3da4f into opensearch-project:main Jan 5, 2024
30 checks passed
@Rishikesh1159 Rishikesh1159 added the backport 2.x Backport to 2.x branch label Jan 5, 2024
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jan 5, 2024
…ngine() in test classes with NRTReplicationEngine. (#11716)

* Replace overriding mockInternalEngine() in test classes with NRTReplicationEngine.

Signed-off-by: Rishikesh1159 <rishireddy1159@gmail.com>

* remove unused comment.

Signed-off-by: Rishikesh1159 <rishireddy1159@gmail.com>

* Add comment for explaining the conditional logic.

Signed-off-by: Rishikesh1159 <rishireddy1159@gmail.com>

* Update comment with exact reason for conditional logic.

Signed-off-by: Rishikesh1159 <rishireddy1159@gmail.com>

---------

Signed-off-by: Rishikesh1159 <rishireddy1159@gmail.com>
(cherry picked from commit 3a3da4f)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
kotwanikunal pushed a commit that referenced this pull request Jan 5, 2024
…ngine() in test classes with NRTReplicationEngine. (#11716) (#11761)

* Replace overriding mockInternalEngine() in test classes with NRTReplicationEngine.



* remove unused comment.



* Add comment for explaining the conditional logic.



* Update comment with exact reason for conditional logic.



---------


(cherry picked from commit 3a3da4f)

Signed-off-by: Rishikesh1159 <rishireddy1159@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
…ngine() in test classes with NRTReplicationEngine. (opensearch-project#11716)

* Replace overriding mockInternalEngine() in test classes with NRTReplicationEngine.

Signed-off-by: Rishikesh1159 <rishireddy1159@gmail.com>

* remove unused comment.

Signed-off-by: Rishikesh1159 <rishireddy1159@gmail.com>

* Add comment for explaining the conditional logic.

Signed-off-by: Rishikesh1159 <rishireddy1159@gmail.com>

* Update comment with exact reason for conditional logic.

Signed-off-by: Rishikesh1159 <rishireddy1159@gmail.com>

---------

Signed-off-by: Rishikesh1159 <rishireddy1159@gmail.com>
shiv0408 pushed a commit to Gaurav614/OpenSearch that referenced this pull request Apr 25, 2024
…ngine() in test classes with NRTReplicationEngine. (opensearch-project#11716)

* Replace overriding mockInternalEngine() in test classes with NRTReplicationEngine.

Signed-off-by: Rishikesh1159 <rishireddy1159@gmail.com>

* remove unused comment.

Signed-off-by: Rishikesh1159 <rishireddy1159@gmail.com>

* Add comment for explaining the conditional logic.

Signed-off-by: Rishikesh1159 <rishireddy1159@gmail.com>

* Update comment with exact reason for conditional logic.

Signed-off-by: Rishikesh1159 <rishireddy1159@gmail.com>

---------

Signed-off-by: Rishikesh1159 <rishireddy1159@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 enhancement Enhancement or improvement to existing feature or request Indexing:Replication Issues and PRs related to core replication framework eg segrep skip-changelog
Projects
None yet
5 participants