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

Async Batch shards changes for GatewayAllocator #8746

Merged
merged 46 commits into from
Apr 26, 2024

Conversation

Gaurav614
Copy link
Contributor

@Gaurav614 Gaurav614 commented Jul 18, 2023

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

  • New functionality includes testing.
    [x] All tests pass
  • New functionality has been documented.
    [x] 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:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

Copy link
Contributor

@amkhar amkhar left a 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.

Copy link
Contributor

@amkhar amkhar left a 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.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 31, 2023

Compatibility status:

Checks if related components are compatible with change 8153a69

Incompatible components

Skipped components

Compatible components

Compatible 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]

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

github-actions bot commented Sep 6, 2023

Compatibility status:

Checks if related components are compatible with change f4b32b2

Incompatible components

Skipped components

Compatible components

@github-actions
Copy link
Contributor

github-actions bot commented Sep 6, 2023

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

github-actions bot commented Sep 6, 2023

Compatibility status:

Checks if related components are compatible with change b9407cc

Incompatible components

Skipped components

Compatible components

@github-actions
Copy link
Contributor

github-actions bot commented Sep 6, 2023

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@shiv0408
Copy link
Member

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.

Copy link
Contributor

❌ 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?

@Gaurav614 Gaurav614 marked this pull request as ready for review December 5, 2023 12:35
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>
@mgodwan
Copy link
Member

mgodwan commented Apr 25, 2024

@Gaurav614 Could you please ensure your branch has the latest changes from main? The failing test [org.opensearch.index.codec.fuzzy/FuzzyFilterPostingsFormatTests/classMethod/](https://build.ci.opensearch.org/job/gradle-check/37728/testReport/org.opensearch.index.codec.fuzzy/FuzzyFilterPostingsFormatTests/classMethod/) has been fixed a week ago in main, and syncing from main should help fix this in your gradle check.

Signed-off-by: Shivansh Arora <hishiv@amazon.com>
Copy link
Contributor

❌ 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?

Copy link
Contributor

✅ Gradle check result for 154d13b: SUCCESS

Copy link

codecov bot commented Apr 25, 2024

Codecov Report

Attention: Patch coverage is 57.36196% with 139 lines in your changes are missing coverage. Please review.

Project coverage is 71.43%. Comparing base (b15cb0c) to head (080c3ba).
Report is 224 commits behind head on main.

Files Patch % Lines
...pensearch/gateway/ShardsBatchGatewayAllocator.java 60.97% 98 Missing and 14 partials ⚠️
...ore/TransportNodesListShardStoreMetadataBatch.java 0.00% 10 Missing ⚠️
.../cluster/routing/allocation/AllocationService.java 38.46% 7 Missing and 1 partial ⚠️
...er/routing/allocation/ExistingShardsAllocator.java 12.50% 7 Missing ⚠️
...va/org/opensearch/cluster/routing/RoutingNode.java 0.00% 1 Missing ⚠️
.../opensearch/gateway/BaseGatewayShardAllocator.java 0.00% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

Signed-off-by: Shivansh Arora <hishiv@amazon.com>
Copy link
Contributor

✅ Gradle check result for 080c3ba: SUCCESS

@shwetathareja shwetathareja added the backport 2.x Backport to 2.x branch label Apr 26, 2024
@shwetathareja shwetathareja merged commit a69cd08 into opensearch-project:main Apr 26, 2024
32 of 35 checks passed
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 128

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 base branch is 2.x and the compare/head branch is backport/backport-8746-to-2.x.

shiv0408 pushed a commit to shiv0408/OpenSearch that referenced this pull request Apr 28, 2024
)

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)
shwetathareja pushed a commit that referenced this pull request Apr 29, 2024
* 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

7 participants