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] Fix SegmentReplicationPressureService to not schedule async tasks when remote failures are disabled #11234

Merged
merged 1 commit into from
Nov 21, 2023

Conversation

mch2
Copy link
Member

@mch2 mch2 commented Nov 16, 2023

Manual backport of #10569 into 2.x

…n remote failures are disabled (opensearch-project#10569)

* Fix SegmentReplicationPressureService to not schedule async tasks when remote failures are disabled

Today segment replication's pressure service provides a setting 'segrep.replication.time.limit' that if set to a positive value
will spawn an Async task every 30s validating if there are replicas over that limit.  If over the limit the task considers if shards should be failed remotely.
The async task is being rescheduled every 30s, even if the setting is set to 0.  This change ensures that task isn't scheduled at all and reconsiders only if
the setting is updated.

Signed-off-by: Marc Handalian <[email protected]>

* PR feedback.

Signed-off-by: Marc Handalian <[email protected]>

* Revert "PR feedback."

This reverts commit 7371161.

Signed-off-by: Marc Handalian <[email protected]>

* Add better unit test to ensure task is scheduled/unscheduled.

Signed-off-by: Marc Handalian <[email protected]>

---------

Signed-off-by: Marc Handalian <[email protected]>
(cherry picked from commit 54ff353)
Copy link
Contributor

Compatibility status:

Checks if related components are compatible with change 3e3cfb8

Incompatible components

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

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/reporting.git, https://github.com/opensearch-project/custom-codecs.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/performance-analyzer-rca.git]

Copy link
Contributor

❕ Gradle check result for 3e3cfb8: UNSTABLE

  • TEST FAILURES:
      1 org.opensearch.remotestore.RemoteStoreStatsIT.testNonZeroPrimaryStatsOnNewlyCreatedIndexWithZeroDocs

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 Nov 16, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (a6748e0) 70.92% compared to head (3e3cfb8) 70.95%.
Report is 1 commits behind head on 2.x.

Additional details and impacted files
@@             Coverage Diff              @@
##                2.x   #11234      +/-   ##
============================================
+ Coverage     70.92%   70.95%   +0.03%     
- Complexity    58958    59007      +49     
============================================
  Files          4867     4867              
  Lines        278457   278462       +5     
  Branches      40810    40810              
============================================
+ Hits         197485   197573      +88     
- Misses        64142    64144       +2     
+ Partials      16830    16745      -85     

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

@dblock dblock merged commit a7248a4 into opensearch-project:2.x Nov 21, 2023
39 of 67 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants