-
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
PrimaryShardAllocator refactor to abstract out shard state and method calls #9760
Conversation
Compatibility status:Checks if related components are compatible with change 61ec18c Incompatible componentsIncompatible components: [https://github.com/opensearch-project/performance-analyzer.git, https://github.com/opensearch-project/performance-analyzer-rca.git] Skipped componentsCompatible componentsCompatible 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/opensearch-oci-object-storage.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/custom-codecs.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/index-management.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/alerting.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/sql.git] |
Gradle Check (Jenkins) Run Completed with:
|
41fcdca
to
4dd5219
Compare
Gradle Check (Jenkins) Run Completed with:
|
Compatibility status:Checks if related components are compatible with change 4dd5219 Incompatible componentsSkipped componentsCompatible components |
Thanks @shiv0408 for making this code reusable. |
Compatibility status:Checks if related components are compatible with change 8a25e7f Incompatible componentsSkipped componentsCompatible components |
Gradle Check (Jenkins) Run Completed with:
|
… calls Signed-off-by: Shivansh Arora <[email protected]>
8a25e7f
to
e4eb9f0
Compare
Signed-off-by: Shivansh Arora <[email protected]>
server/src/main/java/org/opensearch/gateway/PrimaryShardAllocator.java
Outdated
Show resolved
Hide resolved
❌ Gradle check result for 2aa0845: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
❌ Gradle check result for c4454dd: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
❌ Gradle check result for 1ec2ba1: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
server/src/main/java/org/opensearch/gateway/PrimaryShardAllocator.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/gateway/PrimaryShardAllocator.java
Outdated
Show resolved
Hide resolved
This PR is stalled because it has been open for 30 days with no activity. |
❌ Gradle check result for fd9b215: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Signed-off-by: Shivansh Arora <[email protected]>
Signed-off-by: Shivansh Arora <[email protected]>
Signed-off-by: Shivansh Arora <[email protected]>
Signed-off-by: Shivansh Arora <[email protected]>
Signed-off-by: Shivansh Arora <[email protected]>
Signed-off-by: Shivansh Arora <[email protected]>
❌ Gradle check result for d772499: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
❌ Gradle check result for a6fb7fc: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
… calls (opensearch-project#9760) * PrimaryShardAllocator refactor to abstract out shard state and method calls Signed-off-by: Shivansh Arora <[email protected]> Signed-off-by: Shivansh Arora <[email protected]>
… calls (#9760) * PrimaryShardAllocator refactor to abstract out shard state and method calls Signed-off-by: Shivansh Arora <[email protected]> Signed-off-by: Shivansh Arora <[email protected]> (cherry picked from commit afd3969) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
… calls (#9760) (#12762) * PrimaryShardAllocator refactor to abstract out shard state and method calls (cherry picked from commit afd3969) Signed-off-by: Shivansh Arora <[email protected]> Signed-off-by: Shivansh Arora <[email protected]> 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>
… calls (opensearch-project#9760) * PrimaryShardAllocator refactor to abstract out shard state and method calls Signed-off-by: Shivansh Arora <[email protected]> Signed-off-by: Shivansh Arora <[email protected]>
Description
In this PR, we are refactoring the PrimaryShardAllocator code to make it more reusable as we bring in Batch Allocator in #8916.
We have broken this function to multiple functions, so that part of codes can be reused and only a single function need to be overwritten in child class to implement the Batch allocator.
OpenSearch/server/src/main/java/org/opensearch/gateway/PrimaryShardAllocator.java
Lines 93 to 97 in e4a1841
Created new internal classes
NodeShardState
andNodeShardStates
to encapsulate the data that needs to be passed around in these functions.Related Issues
Resolves #8960
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.