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

[Remote Store] Fix shards condition in stats api #7739

Merged
merged 2 commits into from
May 29, 2023

Conversation

ashking94
Copy link
Member

@ashking94 ashking94 commented May 24, 2023

Description

Remote store stats api returns no response if coordinator node does not contain remote enabled shard

If lets say we have 3 nodes - N1, N2 and N3 and there is remote store enabled index index1 with 1 shard (on N1) and 0 replica, then if we call remotestore stats api on N1, it returns the stats. If we call the api on N2 or N3, it returns empty result.

In this PR, we check the index setting by reading the cluster state since the indicesService does not hold the shards that don't reside on underlying coordinator node.

Related Issues

Resolves #7738

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:

@codecov
Copy link

codecov bot commented May 24, 2023

Codecov Report

Merging #7739 (392bb9d) into main (8e2d059) will increase coverage by 0.13%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##               main    #7739      +/-   ##
============================================
+ Coverage     70.67%   70.81%   +0.13%     
- Complexity    56095    56195     +100     
============================================
  Files          4680     4680              
  Lines        266079   266080       +1     
  Branches      39074    39074              
============================================
+ Hits         188062   188435     +373     
+ Misses        62029    61644     -385     
- Partials      15988    16001      +13     
Impacted Files Coverage Δ
...testore/stats/TransportRemoteStoreStatsAction.java 45.94% <100.00%> (+4.27%) ⬆️

... and 492 files with indirect coverage changes

Signed-off-by: Ashish Singh <ssashish@amazon.com>
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.indices.replication.SegmentReplicationIT.testScrollCreatedOnReplica

@ashking94 ashking94 marked this pull request as ready for review May 25, 2023 06:33
@sachinpkale
Copy link
Member

PR description does not provide details on what we are changing. Please add 1-2 lines for the same.

Signed-off-by: Ashish Singh <ssashish@amazon.com>
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.search.SearchWeightedRoutingIT.testSearchAggregationWithNetworkDisruption_FailOpenEnabled
      1 org.opensearch.indices.replication.SegmentReplicationIT.testScrollCreatedOnReplica

@ashking94 ashking94 changed the title Fix shards condition in TransportRemoteStoreStatsAction [Remote Store] Fix shards condition in stats api May 27, 2023
@gbbafna gbbafna merged commit 7f5a378 into opensearch-project:main May 29, 2023
@gbbafna gbbafna added the backport 2.x Backport to 2.x branch label May 29, 2023
opensearch-trigger-bot bot pushed a commit that referenced this pull request May 29, 2023
Signed-off-by: Ashish Singh <ssashish@amazon.com>
(cherry picked from commit 7f5a378)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
ashking94 added a commit to ashking94/OpenSearch that referenced this pull request May 31, 2023
…7739)

Signed-off-by: Ashish Singh <ssashish@amazon.com>
stephen-crawford pushed a commit to stephen-crawford/OpenSearch that referenced this pull request May 31, 2023
andrross pushed a commit that referenced this pull request May 31, 2023
…7838)

* [Remote Store] Fix shards condition in stats api (#7739)

Signed-off-by: Ashish Singh <ssashish@amazon.com>

* Fix remote store stats api rejection count response (#7775)

Signed-off-by: Ashish Singh <ssashish@amazon.com>

---------

Signed-off-by: Ashish Singh <ssashish@amazon.com>
austintlee pushed a commit to austintlee/OpenSearch that referenced this pull request Jun 2, 2023
gaiksaya pushed a commit to gaiksaya/OpenSearch that referenced this pull request Jun 26, 2023
…7739) & (opensearch-project#7774) (opensearch-project#7838)

* [Remote Store] Fix shards condition in stats api (opensearch-project#7739)

Signed-off-by: Ashish Singh <ssashish@amazon.com>

* Fix remote store stats api rejection count response (opensearch-project#7775)

Signed-off-by: Ashish Singh <ssashish@amazon.com>

---------

Signed-off-by: Ashish Singh <ssashish@amazon.com>
shiv0408 pushed a commit to Gaurav614/OpenSearch that referenced this pull request Apr 25, 2024
…7739)

Signed-off-by: Ashish Singh <ssashish@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
backport 2.x Backport to 2.x branch skip-changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remote store stats api returns no response if coordinator node does not contain remote enabled shard
4 participants