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] Add ClusterState utility to identify SEGMENT replication #9593

Merged
merged 3 commits into from
Aug 29, 2023

Conversation

dreamer-89
Copy link
Member

Description

Adds a public method in ClusterState which identifies whether for input index name, SEGMENT replication is enabled or not.

Related Issues

Resolves #9566

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.

…plication

Signed-off-by: Suraj Singh <surajrider@gmail.com>
Signed-off-by: Suraj Singh <surajrider@gmail.com>
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.

few nits but otherwise looks good.

Signed-off-by: Suraj Singh <surajrider@gmail.com>
@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:

@codecov
Copy link

codecov bot commented Aug 28, 2023

Codecov Report

Merging #9593 (2bf680b) into main (569d5c2) will increase coverage by 0.01%.
Report is 4 commits behind head on main.
The diff coverage is 79.16%.

@@             Coverage Diff              @@
##               main    #9593      +/-   ##
============================================
+ Coverage     71.15%   71.17%   +0.01%     
- Complexity    57536    57555      +19     
============================================
  Files          4781     4781              
  Lines        271197   271212      +15     
  Branches      39595    39596       +1     
============================================
+ Hits         192975   193038      +63     
+ Misses        62011    61994      -17     
+ Partials      16211    16180      -31     
Files Changed Coverage Δ
.../opensearch/telemetry/tracing/noop/NoopTracer.java 57.14% <0.00%> (-9.53%) ⬇️
...rg/opensearch/telemetry/tracing/WrappedTracer.java 78.57% <50.00%> (-6.05%) ⬇️
...elemetry/tracing/OTelTracingContextPropagator.java 73.33% <70.00%> (-1.67%) ⬇️
...rg/opensearch/telemetry/tracing/DefaultTracer.java 93.10% <100.00%> (+0.51%) ⬆️
.../org/opensearch/action/get/TransportGetAction.java 62.22% <100.00%> (-3.78%) ⬇️
...main/java/org/opensearch/cluster/ClusterState.java 97.87% <100.00%> (+0.02%) ⬆️
...racing/ThreadContextBasedTracerContextStorage.java 74.19% <100.00%> (+0.86%) ⬆️

... and 482 files with indirect coverage changes

@dreamer-89
Copy link
Member Author

dreamer-89 commented Aug 29, 2023

Previous gradle check failures related to flaky test failures.

  1. [CI]flaky test faiure - org.opensearch.remotestore.RemoteIndexRecoveryIT.testRerouteRecovery #9580
  2. [BUG] opensearch.index.shard/RemoteIndexShardTests/testNRTReplicaWithRemoteStorePromotedAsPrimaryRefreshCommit flaky test failure #9598

Windows precommit failure is due to insufficient memory.
https://github.com/opensearch-project/OpenSearch/actions/runs/6005796874/job/16289211961?pr=9593

> Task :modules:analysis-common:jarHell FAILED
| Output for C:\hostedtoolcache\windows\Java_Temurin-Hotspot_jdk\11.0.20-8\x64\bin\java.exe:OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x0000000090000000, 117440512, 0) failed; error='The paging file is too small for this operation to complete' (DOS error/errno=1455)
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 117440512 bytes for Failed to commit area from 0x0000000090000000 to 0x0000000097000000 of length 117440512.
# An error report file with more information is saved as:
# D:\a\OpenSearch\OpenSearch\modules\analysis-common\hs_err_pid2948.log

@dreamer-89 dreamer-89 added the backport 2.x Backport to 2.x branch label Aug 29, 2023
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.index.shard.RemoteStoreRefreshListenerTests.testRefreshSuccessOnSecondAttempt

@dreamer-89 dreamer-89 merged commit 61d4d43 into opensearch-project:main Aug 29, 2023
12 of 15 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Aug 29, 2023
…plication (#9593)

* [Segment Replication] Add ClusterState utility to identify SEGMENT replication

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Address review comment

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Address review comments

Signed-off-by: Suraj Singh <surajrider@gmail.com>

---------

Signed-off-by: Suraj Singh <surajrider@gmail.com>
(cherry picked from commit 61d4d43)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
mch2 pushed a commit that referenced this pull request Aug 29, 2023
…plication (#9593) (#9600)

* [Segment Replication] Add ClusterState utility to identify SEGMENT replication



* Address review comment



* Address review comments



---------


(cherry picked from commit 61d4d43)

Signed-off-by: Suraj Singh <surajrider@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>
kaushalmahi12 pushed a commit to kaushalmahi12/OpenSearch that referenced this pull request Sep 12, 2023
…plication (opensearch-project#9593)

* [Segment Replication] Add ClusterState utility to identify SEGMENT replication

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Address review comment

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Address review comments

Signed-off-by: Suraj Singh <surajrider@gmail.com>

---------

Signed-off-by: Suraj Singh <surajrider@gmail.com>
Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
brusic pushed a commit to brusic/OpenSearch that referenced this pull request Sep 25, 2023
…plication (opensearch-project#9593)

* [Segment Replication] Add ClusterState utility to identify SEGMENT replication

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Address review comment

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Address review comments

Signed-off-by: Suraj Singh <surajrider@gmail.com>

---------

Signed-off-by: Suraj Singh <surajrider@gmail.com>
Signed-off-by: Ivan Brusic <ivan.brusic@flocksafety.com>
shiv0408 pushed a commit to Gaurav614/OpenSearch that referenced this pull request Apr 25, 2024
…plication (opensearch-project#9593)

* [Segment Replication] Add ClusterState utility to identify SEGMENT replication

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Address review comment

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* Address review comments

Signed-off-by: Suraj Singh <surajrider@gmail.com>

---------

Signed-off-by: Suraj Singh <surajrider@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 skip-changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Segment Replication] Expose utility to denote whether data can be stale
3 participants