-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Async Batch shards changes for GatewayAllocator #8746
Async Batch shards changes for GatewayAllocator #8746
Conversation
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
server/src/main/java/org/opensearch/gateway/GatewayAllocator.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/gateway/GatewayAllocator.java
Outdated
Show resolved
Hide resolved
Gradle Check (Jenkins) Run Completed with:
|
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 @Gaurav614 for the changes. Partially gone through it, left minor comments.
server/src/main/java/org/opensearch/cluster/routing/allocation/ExistingShardsAllocator.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/gateway/GatewayAllocator.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/gateway/GatewayAllocator.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/gateway/GatewayAllocator.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/gateway/GatewayAllocator.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/gateway/GatewayAllocator.java
Outdated
Show resolved
Hide resolved
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.
Please re-check for any other race conditions if possible.
server/src/main/java/org/opensearch/gateway/GatewayAllocator.java
Outdated
Show resolved
Hide resolved
Compatibility status:Checks if related components are compatible with change 8153a69 Incompatible componentsSkipped componentsCompatible componentsCompatible components: [https://github.com/opensearch-project/custom-codecs.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/flow-framework.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/reporting.git, https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/performance-analyzer.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/sql.git] |
Gradle Check (Jenkins) Run Completed with:
|
Compatibility status:Checks if related components are compatible with change f4b32b2 Incompatible componentsSkipped componentsCompatible components |
Gradle Check (Jenkins) Run Completed with:
|
Compatibility status:Checks if related components are compatible with change b9407cc Incompatible componentsSkipped componentsCompatible components |
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Added the required changes to GatewayAllocator for running the afterPrimaryBeforeReplica method to this PR as this PR has all the changes required to run the AsyncShardBatch flow. |
❌ Gradle check result for b776483: 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/internalClusterTest/java/org/opensearch/gateway/RecoveryFromGatewayIT.java
Outdated
Show resolved
Hide resolved
server/src/internalClusterTest/java/org/opensearch/gateway/RecoveryFromGatewayIT.java
Show resolved
Hide resolved
server/src/main/java/org/opensearch/cluster/routing/allocation/ExistingShardsAllocator.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/gateway/BaseGatewayShardAllocator.java
Show resolved
Hide resolved
server/src/main/java/org/opensearch/gateway/GatewayAllocator.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/gateway/GatewayAllocator.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/gateway/GatewayAllocator.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/gateway/GatewayAllocator.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/gateway/GatewayAllocator.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/gateway/GatewayAllocator.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Shivansh Arora <hishiv@amazon.com>
Signed-off-by: Shivansh Arora <hishiv@amazon.com>
Signed-off-by: Shivansh Arora <hishiv@amazon.com>
Signed-off-by: Shivansh Arora <hishiv@amazon.com>
Signed-off-by: Shivansh Arora <hishiv@amazon.com>
Signed-off-by: Shivansh Arora <hishiv@amazon.com>
# Conflicts: # server/src/internalClusterTest/java/org/opensearch/gateway/RecoveryFromGatewayIT.java # server/src/main/java/org/opensearch/cluster/routing/allocation/AllocationService.java # server/src/main/java/org/opensearch/common/settings/ClusterSettings.java # server/src/main/java/org/opensearch/gateway/ReplicaShardBatchAllocator.java # server/src/main/java/org/opensearch/indices/store/TransportNodesListShardStoreMetadataBatch.java # server/src/main/java/org/opensearch/node/Node.java # server/src/test/java/org/opensearch/gateway/ShardBatchCacheTests.java # test/framework/src/main/java/org/opensearch/test/gateway/TestGatewayAllocator.java
Signed-off-by: Shivansh Arora <hishiv@amazon.com>
@Gaurav614 Could you please ensure your branch has the latest changes from main? The failing test |
Signed-off-by: Shivansh Arora <hishiv@amazon.com>
❌ Gradle check result for 3f103c1: 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? |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8746 +/- ##
============================================
+ Coverage 71.42% 71.43% +0.01%
- Complexity 59978 60789 +811
============================================
Files 4985 5045 +60
Lines 282275 286042 +3767
Branches 40946 41427 +481
============================================
+ Hits 201603 204327 +2724
- Misses 63999 64832 +833
- Partials 16673 16883 +210 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Shivansh Arora <hishiv@amazon.com>
a69cd08
into
opensearch-project:main
The backport to
To backport manually, run these commands in your terminal: # Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/OpenSearch/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch/backport-2.x
# Create a new branch
git switch --create backport/backport-8746-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 a69cd0864a673579a9cb2190da765bc1ebfd0a22
# Push it to GitHub
git push --set-upstream origin backport/backport-8746-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch/backport-2.x Then, create a pull request where the |
) Changes for create/update/delete batches for batch mode for async fetch for both primary & replica. It also added the node scope setting to enable/ disable batch mode. Signed-off-by: Gaurav Chandani <chngau@amazon.com> Signed-off-by: Shivansh Arora <hishiv@amazon.com> Signed-off-by: Aman Khare <amkhar@amazon.com> (cherry picked from commit a69cd08)
* Async Batch shards changes for GatewayAllocator (#8746) Changes for create/update/delete batches for batch mode for async fetch for both primary & replica. It also added the node scope setting to enable/ disable batch mode. Signed-off-by: Gaurav Chandani <chngau@amazon.com> Signed-off-by: Shivansh Arora <hishiv@amazon.com> Signed-off-by: Aman Khare <amkhar@amazon.com> (cherry picked from commit a69cd08)
Description
This pull request is part of the improvement #5098
And mainly is around creation of batches, cleaning of batcher and other changes related to AsyncBatchShardFetch in GatewayAllocator
The PR is dependent on following PRs:
#8742
#8218
#8356
Related Issues
Resolves #[Issue number to be closed when this PR is merged]
Check List
[x] All tests pass
[x] New functionality has javadoc added
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.