-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Partially resolved issue #4687 by changing the improper status code for concurrent snapshot executions #5855
Partially resolved issue #4687 by changing the improper status code for concurrent snapshot executions #5855
Conversation
…y_Requests). Signed-off-by: Mani <[email protected]>
Gradle Check (Jenkins) Run Completed with:
|
Codecov Report
@@ Coverage Diff @@
## main #5855 +/- ##
============================================
+ Coverage 71.00% 71.09% +0.09%
- Complexity 57166 57248 +82
============================================
Files 4763 4763
Lines 270003 270003
Branches 39508 39508
============================================
+ Hits 191713 191967 +254
+ Misses 62139 61866 -273
- Partials 16151 16170 +19
|
@Bukhtawar Hi, for issue #4687, should I make a PR by resolving Repository exception status as well ? |
public RestStatus status() { | ||
return RestStatus.SERVICE_UNAVAILABLE; | ||
return RestStatus.TOO_MANY_REQUESTS; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks can you please also add a test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am wondering shouldn't this be 409 (Conflict) instead of 429?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the underlying error? Is it concurrent snapshots being taken whereas this isn't supported? In that case it should definitely not be a 429, that implies the server is unable to handle traffic, not a predictable conflicting behavior - 409 seems more correct in that case.
"Thrown when a user tries to multiple conflicting snapshot/restore operations at the same time." -> 409
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only question I had was that since it is concurrent & not specifically conflicting, should I change that to 409 ?
@dblock @shwetathareja
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@baba-devv : Since it is concurrent, it is resulting in conflict and hence rejected by server.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@baba-devv yes in my opinion it should be 409
…rch-project#8883) * Updating Version.java from server/ to buildSrc/ Signed-off-by: Varun Jain <[email protected]> * Adding Changelog Signed-off-by: Varun Jain <[email protected]> * Path update Signed-off-by: Varun Jain <[email protected]> * Changelog Update Signed-off-by: Varun Jain <[email protected]> * Removing Changelog from commit Signed-off-by: Varun Jain <[email protected]> --------- Signed-off-by: Varun Jain <[email protected]>
…dex (opensearch-project#8792) * Add support to restore only unassigned shards of an index --------- Signed-off-by: Sachin Kale <[email protected]> Signed-off-by: Sachin Kale <[email protected]> Co-authored-by: Sachin Kale <[email protected]>
…arch-project#8929) Signed-off-by: Andriy Redko <[email protected]> (cherry picked from commit 212dba4)
opensearch-project#8901) * Fix flakiness in MasterServiceTests.testThrottlingForMultipleTaskTypes The test configured a [timeout duration of zero][1] for certain tasks and asserted that all tasks were throttled or timed out. This is not a valid assertion because it is possible for a task to complete before the [asynchronous timeout operation runs][2], which means the task would complete successfully. The fix is to adjust the assertion to allow for successful tasks in this case. [1]: https://github.com/opensearch-project/OpenSearch/blob/60985bc300d9eafd36c1ab25d46235e1c925c565/server/src/test/java/org/opensearch/cluster/service/MasterServiceTests.java#L941 [2]: https://github.com/opensearch-project/OpenSearch/blob/9fc3f4096958159ec9b53012fc7ced19fd793e1b/server/src/main/java/org/opensearch/common/util/concurrent/PrioritizedOpenSearchThreadPoolExecutor.java#L266 Signed-off-by: Andrew Ross <[email protected]> * Add a deterministic test case for timeout Signed-off-by: Andrew Ross <[email protected]> --------- Signed-off-by: Andrew Ross <[email protected]>
…node replication (opensearch-project#8912) * Fix SegmentReplicationIT.testReplicahasDiffFilesThanPrimary This test is now failing for node-node replication. On the primary shard the prepareSegmentReplication method should cancel any ongoing replication if it is running and start a new sync. Thisis incorrectly using Map.compute which will not replace the existing handler entry in the allocationIdToHandlers map. It will only cancel the existing source handler. As a result this can leave the copyState map with an entry and hold an index commit while the test is cleaning up. The copyState is only cleared when a handler is cancelled directly or from a cluster state update. Signed-off-by: Marc Handalian <[email protected]> * PR feedback. Signed-off-by: Marc Handalian <[email protected]> --------- Signed-off-by: Marc Handalian <[email protected]>
The intent of opensearch-project#8825 was to retry only specified tests. The wrong parameter was configured though: ['filter' should be set][1], not 'classRetry'. [1]: https://github.com/gradle/test-retry-gradle-plugin/blob/main/README.adoc#filtering Signed-off-by: Andrew Ross <[email protected]>
…roject#8940) This commit rote refactors MediaTypeParserRegistry to MediaTypeRegistry to make the class naming align with the intention of the logic. The MediaTypeRegistry is a mechanism for downstream extensions to register concrete MediaTypes thus having Parser in the name is unneeded. Signed-off-by: Nicholas Walter Knize <[email protected]>
…invocation of segment replication (opensearch-project#8937) * [Segment Replication] Use deterministic mechanism to have concurrent invocation of segment replication Signed-off-by: Suraj Singh <[email protected]> * Clean up Signed-off-by: Suraj Singh <[email protected]> --------- Signed-off-by: Suraj Singh <[email protected]>
* Register MediaTypes through SPI This commit provides a new SPI interface MediaContentProvider. Modules, Plugins, Extensions, implement this interface and provide the concrete MediaType implementations (and MIME aliases) through getMediaTypes and getAdditionalMediaTypes, respectively. This enables downstream extensions (e.g., serverless or cloud native implementations) to register their own custom MediaType and define the serialization format that is registered when the classloader loads the MediaTypeRegistry instead of having to register the types explicitly in application code. Signed-off-by: Nicholas Walter Knize <[email protected]> * pass the MediaTypeProvider classloader to the SPI ServiceLoader Signed-off-by: Nicholas Walter Knize <[email protected]> --------- Signed-off-by: Nicholas Walter Knize <[email protected]>
…ch-project#8943) Signed-off-by: Suraj Singh <[email protected]>
Signed-off-by: Sarthak Aggarwal <[email protected]>
…ect#8914) Signed-off-by: Gaurav Bafna <[email protected]>
…ch-project#8963) Signed-off-by: Andriy Redko <[email protected]>
… assemble task fails without them. (opensearch-project#8904) Signed-off-by: Evan Kielley <[email protected]>
…" (opensearch-project#8968) This reverts commit c43743d. Signed-off-by: Andriy Redko <[email protected]>
…ributions bundled with JRE (opensearch-project#8195) Signed-off-by: Andriy Redko <[email protected]>
…er (opensearch-project#8967) * Replace deprecated Query#rewrite(IndexReader with rewrite(IndexSearcher Query#rewrite(IndexReader reader) is deprecated in Lucene 9.7 and removed in Lucene 10 in favor of Query#rewrite(IndexSearcher searcher). The latter provides LeafCollector hooks to optimize for concurrent queries. This commit cuts over usage of rewrite(IndexReader) to rewrite(IndexSearcher) for Lucene 10 compatibility and upstream query optimizations. Signed-off-by: Nicholas Walter Knize <[email protected]> * remove stray collector.finish Signed-off-by: Nicholas Walter Knize <[email protected]> --------- Signed-off-by: Nicholas Walter Knize <[email protected]>
…erRegistry (opensearch-project#8826) XContentFactory is tightly coupled to concrete XContentType. This commit builds on the MediaType abstractions, specifically MediaTypeParserRegistry, to decouple contentType introspection (e.g., determining type from byte streams) from concrete XContentTypes. This enables downstream extensions (e.g., serverless or cloud native implementations) to register their own custom XContentType and define the serialization format for proper content introspection. This also removes the tight coupling of :libs:opensearch-x-content with abstract interface contracts further enabling modularity. Signed-off-by: Nicholas Walter Knize <[email protected]>
Signed-off-by: Sarthak Aggarwal <[email protected]>
…" (opensearch-project#8968) This reverts commit c43743d. Signed-off-by: Andriy Redko <[email protected]>
…eStorePromotedAsPrimaryCommitCommit (opensearch-project#8931) Signed-off-by: Poojita Raj <[email protected]> Return 409 Conflict HTTP status instead of 500 on failure to concurrently execute snapshots Signed-off-by: Mani <[email protected]>
Signed-off-by: Sarthak Aggarwal <[email protected]>
…" (opensearch-project#8968) This reverts commit c43743d. Signed-off-by: Andriy Redko <[email protected]>
d5b8dcc
to
7a73a7d
Compare
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Superseded by #8986 |
Signed-off-by: Mani [email protected]
Description
Partially resolved issue #4687 by changing the improper status code for concurrent snapshot execution exception.
Issues Resolved
#4687
Check List
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.