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 - Allow search idle with no replicas #8173

Merged
merged 5 commits into from
Jul 14, 2023

Conversation

mch2
Copy link
Member

@mch2 mch2 commented Jun 20, 2023

This is a re-open of #7736.

Description
With Segment Replication enabled we generally disable shard idle. This change ensures there are replicas in the index before disabling shard idle with SR. It will warn if a user attempts to update the search.idle.after interval with replicas configured.

Related Issues
#7761

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)

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.

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.search.backpressure.SearchBackpressureIT.testSearchTaskCancellationWithHighCpu

@codecov
Copy link

codecov bot commented Jun 20, 2023

Codecov Report

Merging #8173 (fde8361) into main (6a19660) will decrease coverage by 0.02%.
The diff coverage is 55.55%.

@@             Coverage Diff              @@
##               main    #8173      +/-   ##
============================================
- Coverage     70.88%   70.87%   -0.02%     
- Complexity    57196    57200       +4     
============================================
  Files          4771     4771              
  Lines        270312   270323      +11     
  Branches      39505    39509       +4     
============================================
- Hits         191609   191585      -24     
- Misses        62600    62616      +16     
- Partials      16103    16122      +19     
Impacted Files Coverage Δ
.../main/java/org/opensearch/index/IndexSettings.java 85.25% <0.00%> (-0.43%) ⬇️
...earch/action/search/AbstractSearchAsyncAction.java 77.03% <25.00%> (-1.50%) ⬇️
...in/java/org/opensearch/index/shard/IndexShard.java 69.65% <100.00%> (+0.44%) ⬆️
...ices/replication/RemoteStoreReplicationSource.java 94.28% <100.00%> (+0.73%) ⬆️

... and 476 files with indirect coverage changes

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.snapshots.DedicatedClusterSnapshotRestoreIT.testIndexDeletionDuringSnapshotCreationInQueue
      1 org.opensearch.search.backpressure.SearchBackpressureIT.testSearchTaskCancellationWithHighCpu

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.indices.replication.SegmentReplicationRelocationIT.testPrimaryRelocationWithSegRepFailure
      1 org.opensearch.index.IndexServiceTests.testAsyncTranslogTrimTaskOnClosedIndex

@github-actions

This comment was marked as outdated.

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.search.backpressure.SearchBackpressureIT.testSearchShardTaskCancellationWithHighCpu

@mch2
Copy link
Member Author

mch2 commented Jul 14, 2023

@andrross @Bukhtawar Any concerns on this? I think this is still valuable particularly with remote store and we can explore enabling search idle across the board with SegRep in a separate effort.

@andrross
Copy link
Member

Since "search idle" is a performance optimization I think we have a lot of options to change and improve the behavior going forward, so I don't see any one-way doors here. I also think this is an improvement over the current behavior of disabling search idle when there are no replicas, so I'm good with this change even as we explore improving the search idle behavior in all cases.

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@mch2
Copy link
Member Author

mch2 commented Jul 14, 2023

Gradle Check (Jenkins) Run Completed with:

#8699

mch2 added 5 commits July 14, 2023 15:11
…index.

Signed-off-by: Marc Handalian <handalm@amazon.com>
…enabled.

Signed-off-by: Marc Handalian <handalm@amazon.com>
Signed-off-by: Marc Handalian <handalm@amazon.com>
Signed-off-by: Marc Handalian <handalm@amazon.com>
Signed-off-by: Marc Handalian <handalm@amazon.com>
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@andrross andrross added backport 2.x Backport to 2.x branch v2.10.0 labels Jul 14, 2023
@andrross andrross merged commit ca74aac into opensearch-project:main Jul 14, 2023
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jul 14, 2023
* Segment Replication - Allow shard idle when there are no replicas an index.

Signed-off-by: Marc Handalian <handalm@amazon.com>

* Add warning when updating search.idle.after with Segment Replication enabled.

Signed-off-by: Marc Handalian <handalm@amazon.com>

* PR cleanup.

Signed-off-by: Marc Handalian <handalm@amazon.com>

* Add more tests.

Signed-off-by: Marc Handalian <handalm@amazon.com>

* Remove unnecessary assertBusy

Signed-off-by: Marc Handalian <handalm@amazon.com>

---------

Signed-off-by: Marc Handalian <handalm@amazon.com>
(cherry picked from commit ca74aac)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@mch2 mch2 deleted the disableSI branch July 15, 2023 00:02
mch2 pushed a commit that referenced this pull request Jul 15, 2023
* Segment Replication - Allow shard idle when there are no replicas an index.



* Add warning when updating search.idle.after with Segment Replication enabled.



* PR cleanup.



* Add more tests.



* Remove unnecessary assertBusy



---------


(cherry picked from commit ca74aac)

Signed-off-by: Marc Handalian <handalm@amazon.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>
suranjay pushed a commit to suranjay/OpenSearch that referenced this pull request Jul 18, 2023
…project#8173)

* Segment Replication - Allow shard idle when there are no replicas an index.

Signed-off-by: Marc Handalian <handalm@amazon.com>

* Add warning when updating search.idle.after with Segment Replication enabled.

Signed-off-by: Marc Handalian <handalm@amazon.com>

* PR cleanup.

Signed-off-by: Marc Handalian <handalm@amazon.com>

* Add more tests.

Signed-off-by: Marc Handalian <handalm@amazon.com>

* Remove unnecessary assertBusy

Signed-off-by: Marc Handalian <handalm@amazon.com>

---------

Signed-off-by: Marc Handalian <handalm@amazon.com>
baba-devv pushed a commit to baba-devv/OpenSearch that referenced this pull request Jul 29, 2023
…project#8173)

* Segment Replication - Allow shard idle when there are no replicas an index.

Signed-off-by: Marc Handalian <handalm@amazon.com>

* Add warning when updating search.idle.after with Segment Replication enabled.

Signed-off-by: Marc Handalian <handalm@amazon.com>

* PR cleanup.

Signed-off-by: Marc Handalian <handalm@amazon.com>

* Add more tests.

Signed-off-by: Marc Handalian <handalm@amazon.com>

* Remove unnecessary assertBusy

Signed-off-by: Marc Handalian <handalm@amazon.com>

---------

Signed-off-by: Marc Handalian <handalm@amazon.com>
kaushalmahi12 pushed a commit to kaushalmahi12/OpenSearch that referenced this pull request Sep 12, 2023
…project#8173)

* Segment Replication - Allow shard idle when there are no replicas an index.

Signed-off-by: Marc Handalian <handalm@amazon.com>

* Add warning when updating search.idle.after with Segment Replication enabled.

Signed-off-by: Marc Handalian <handalm@amazon.com>

* PR cleanup.

Signed-off-by: Marc Handalian <handalm@amazon.com>

* Add more tests.

Signed-off-by: Marc Handalian <handalm@amazon.com>

* Remove unnecessary assertBusy

Signed-off-by: Marc Handalian <handalm@amazon.com>

---------

Signed-off-by: Marc Handalian <handalm@amazon.com>
Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
shiv0408 pushed a commit to Gaurav614/OpenSearch that referenced this pull request Apr 25, 2024
…project#8173)

* Segment Replication - Allow shard idle when there are no replicas an index.

Signed-off-by: Marc Handalian <handalm@amazon.com>

* Add warning when updating search.idle.after with Segment Replication enabled.

Signed-off-by: Marc Handalian <handalm@amazon.com>

* PR cleanup.

Signed-off-by: Marc Handalian <handalm@amazon.com>

* Add more tests.

Signed-off-by: Marc Handalian <handalm@amazon.com>

* Remove unnecessary assertBusy

Signed-off-by: Marc Handalian <handalm@amazon.com>

---------

Signed-off-by: Marc Handalian <handalm@amazon.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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants