-
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
Compress and cache cluster state during validate join request #7321
Compress and cache cluster state during validate join request #7321
Conversation
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
server/src/main/java/org/opensearch/cluster/CompressionHelper.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/cluster/coordination/PublicationTransportHandler.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/common/settings/ClusterSettings.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/cluster/CompressionHelper.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/cluster/coordination/JoinHelper.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/cluster/coordination/JoinHelper.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/cluster/coordination/JoinHelper.java
Outdated
Show resolved
Hide resolved
Gradle Check (Jenkins) Run Completed with:
|
2d72f5a
to
dffd822
Compare
Signed-off-by: Aman Khare <amkhar@amazon.com>
Signed-off-by: Aman Khare <amkhar@amazon.com>
Signed-off-by: Aman Khare <amkhar@amazon.com>
… flow and refactor code Signed-off-by: Aman Khare <amkhar@amazon.com>
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
1 similar comment
Gradle Check (Jenkins) Run Completed with:
|
Signed-off-by: Aman Khare <amkhar@amazon.com>
Verified org.opensearch.remotestore.SegmentReplicationRemoteStoreIT.testReplicaHasDiffFilesThanPrimary test is running fine on local, it should be a flaky test. Pushed another commit to see. Else will create a bug for this IT. |
Gradle Check (Jenkins) Run Completed with:
|
Signed-off-by: Aman Khare <amkhar@amazon.com>
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.
Looks good, just one super minor comment. Thanks for working through this and dealing with all my comments!
server/src/main/java/org/opensearch/cluster/coordination/JoinHelper.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Andrew Ross <andrross@amazon.com> Signed-off-by: Aman Khare <85096200+amkhar@users.noreply.github.com>
Gradle Check (Jenkins) Run Completed with:
|
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-7321-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 b17c88c8c33b9f627cbfbbd0cffba233bb17d6bb
# Push it to GitHub
git push --set-upstream origin backport/backport-7321-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/backport-2.x Then, create a pull request where the |
…arch-project#7321) * Compress and cache cluster state during validate join request Signed-off-by: Aman Khare <amkhar@amazon.com> * Add changelog and license Signed-off-by: Aman Khare <amkhar@amazon.com> * Add javadoc and correct styling Signed-off-by: Aman Khare <amkhar@amazon.com> * Add new handler for sending compressed cluster state in validate join flow and refactor code Signed-off-by: Aman Khare <amkhar@amazon.com> * Refactor util method Signed-off-by: Aman Khare <amkhar@amazon.com> * optimize imports Signed-off-by: Aman Khare <amkhar@amazon.com> * Use cluster state version based cache instead of time based cache Signed-off-by: Aman Khare <amkhar@amazon.com> * style fix Signed-off-by: Aman Khare <amkhar@amazon.com> * fix styling 2 Signed-off-by: Aman Khare <amkhar@amazon.com> * Use concurrent hashmap instead of cache, add UT class for ClusterStateUtils Signed-off-by: Aman Khare <amkhar@amazon.com> * style fix Signed-off-by: Aman Khare <amkhar@amazon.com> * Use AtomicReference instead of ConcurrentHashMap Signed-off-by: Aman Khare <amkhar@amazon.com> * Use method overloading to simplify the caller code Signed-off-by: Aman Khare <amkhar@amazon.com> * Resolve conflicts Signed-off-by: Aman Khare <amkhar@amazon.com> * Change code structure to separate the flow for JoinHelper and PublicationTransportHelper Signed-off-by: Aman Khare <amkhar@amazon.com> * Remove unnecessary input.setVersion line Co-authored-by: Andrew Ross <andrross@amazon.com> Signed-off-by: Aman Khare <85096200+amkhar@users.noreply.github.com> --------- Signed-off-by: Aman Khare <amkhar@amazon.com> Signed-off-by: Aman Khare <85096200+amkhar@users.noreply.github.com> Co-authored-by: Aman Khare <amkhar@amazon.com> Co-authored-by: Andrew Ross <andrross@amazon.com> (cherry picked from commit b17c88c)
Move entry for opensearch-project#7321 to correct section and fix the malformed entry from opensearch-project#7452. Signed-off-by: Andrew Ross <andrross@amazon.com>
Move entry for opensearch-project#7321 to correct section and fix the malformed entry from opensearch-project#7452. Signed-off-by: Andrew Ross <andrross@amazon.com>
Move entry for opensearch-project#7321 to correct section and fix the malformed entry from opensearch-project#7452. Signed-off-by: Andrew Ross <andrross@amazon.com>
…1.0.83 (#7933) * Update network schema Signed-off-by: Stephen Crawford <steecraw@amazon.com> * Update CHANGELOG.md Signed-off-by: Stephen Crawford <65832608+scrawfor99@users.noreply.github.com> * Update CHANGELOG.md Signed-off-by: Stephen Crawford <65832608+scrawfor99@users.noreply.github.com> * Add joni and jcoding to path Signed-off-by: Stephen Crawford <steecraw@amazon.com> * Update buildSrc/src/main/java/org/opensearch/gradle/precommit/ValidateJsonAgainstSchemaTask.java Signed-off-by: Stephen Crawford <65832608+scrawfor99@users.noreply.github.com> * Update buildSrc/src/main/java/org/opensearch/gradle/precommit/ValidateJsonAgainstSchemaTask.java Signed-off-by: Stephen Crawford <65832608+scrawfor99@users.noreply.github.com> * Update buildSrc/src/main/java/org/opensearch/gradle/precommit/ValidateJsonAgainstSchemaTask.java Signed-off-by: Stephen Crawford <65832608+scrawfor99@users.noreply.github.com> * Update rest-api-spec/src/main/resources/rest-api-spec/api/bulk.json Signed-off-by: Stephen Crawford <65832608+scrawfor99@users.noreply.github.com> * Update rest-api-spec/src/main/resources/rest-api-spec/api/bulk.json Signed-off-by: Stephen Crawford <65832608+scrawfor99@users.noreply.github.com> * Update Apache Lucene to 9.7.0-snapshot-204acc3 (#7887) Signed-off-by: Andriy Redko <andriy.redko@aiven.io> * Add bwc version 2.8.1 (#7942) Signed-off-by: Andriy Redko <andriy.redko@aiven.io> Co-authored-by: opensearch-trigger-bot[bot] <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> * Fix changelog entries (#7946) Move entry for #7321 to correct section and fix the malformed entry from #7452. Signed-off-by: Andrew Ross <andrross@amazon.com> * SegRep with Remote: Add Remote store as a segment replication source (#7653) * SegRep with Remote: Add Remote store as a segment replication source Signed-off-by: Ankit Kala <ankikala@amazon.com> * Fix Gradle check Signed-off-by: Ankit Kala <ankikala@amazon.com> * Retrying Gradle check Signed-off-by: Ankit Kala <ankikala@amazon.com> --------- Signed-off-by: Ankit Kala <ankikala@amazon.com> * rebase Signed-off-by: Stephen Crawford <steecraw@amazon.com> * remove empty line Signed-off-by: Stephen Crawford <steecraw@amazon.com> * Update CHANGELOG.md Signed-off-by: Stephen Crawford <65832608+scrawfor99@users.noreply.github.com> --------- Signed-off-by: Stephen Crawford <steecraw@amazon.com> Signed-off-by: Stephen Crawford <65832608+scrawfor99@users.noreply.github.com> Signed-off-by: Andriy Redko <andriy.redko@aiven.io> Signed-off-by: Andrew Ross <andrross@amazon.com> Signed-off-by: Ankit Kala <ankikala@amazon.com> Co-authored-by: Andriy Redko <andriy.redko@aiven.io> Co-authored-by: opensearch-trigger-bot[bot] <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Co-authored-by: Andrew Ross <andrross@amazon.com> Co-authored-by: Ankit Kala <ankikala@amazon.com>
…arch-project#7321) * Compress and cache cluster state during validate join request Signed-off-by: Aman Khare <amkhar@amazon.com> * Add changelog and license Signed-off-by: Aman Khare <amkhar@amazon.com> * Add javadoc and correct styling Signed-off-by: Aman Khare <amkhar@amazon.com> * Add new handler for sending compressed cluster state in validate join flow and refactor code Signed-off-by: Aman Khare <amkhar@amazon.com> * Refactor util method Signed-off-by: Aman Khare <amkhar@amazon.com> * optimize imports Signed-off-by: Aman Khare <amkhar@amazon.com> * Use cluster state version based cache instead of time based cache Signed-off-by: Aman Khare <amkhar@amazon.com> * style fix Signed-off-by: Aman Khare <amkhar@amazon.com> * fix styling 2 Signed-off-by: Aman Khare <amkhar@amazon.com> * Use concurrent hashmap instead of cache, add UT class for ClusterStateUtils Signed-off-by: Aman Khare <amkhar@amazon.com> * style fix Signed-off-by: Aman Khare <amkhar@amazon.com> * Use AtomicReference instead of ConcurrentHashMap Signed-off-by: Aman Khare <amkhar@amazon.com> * Use method overloading to simplify the caller code Signed-off-by: Aman Khare <amkhar@amazon.com> * Resolve conflicts Signed-off-by: Aman Khare <amkhar@amazon.com> * Change code structure to separate the flow for JoinHelper and PublicationTransportHelper Signed-off-by: Aman Khare <amkhar@amazon.com> * Remove unnecessary input.setVersion line Co-authored-by: Andrew Ross <andrross@amazon.com> Signed-off-by: Aman Khare <85096200+amkhar@users.noreply.github.com> --------- Signed-off-by: Aman Khare <amkhar@amazon.com> Signed-off-by: Aman Khare <85096200+amkhar@users.noreply.github.com> Co-authored-by: Aman Khare <amkhar@amazon.com> Co-authored-by: Andrew Ross <andrross@amazon.com> (cherry picked from commit b17c88c)
…1.0.83 (opensearch-project#7933) * Update network schema Signed-off-by: Stephen Crawford <steecraw@amazon.com> * Update CHANGELOG.md Signed-off-by: Stephen Crawford <65832608+scrawfor99@users.noreply.github.com> * Update CHANGELOG.md Signed-off-by: Stephen Crawford <65832608+scrawfor99@users.noreply.github.com> * Add joni and jcoding to path Signed-off-by: Stephen Crawford <steecraw@amazon.com> * Update buildSrc/src/main/java/org/opensearch/gradle/precommit/ValidateJsonAgainstSchemaTask.java Signed-off-by: Stephen Crawford <65832608+scrawfor99@users.noreply.github.com> * Update buildSrc/src/main/java/org/opensearch/gradle/precommit/ValidateJsonAgainstSchemaTask.java Signed-off-by: Stephen Crawford <65832608+scrawfor99@users.noreply.github.com> * Update buildSrc/src/main/java/org/opensearch/gradle/precommit/ValidateJsonAgainstSchemaTask.java Signed-off-by: Stephen Crawford <65832608+scrawfor99@users.noreply.github.com> * Update rest-api-spec/src/main/resources/rest-api-spec/api/bulk.json Signed-off-by: Stephen Crawford <65832608+scrawfor99@users.noreply.github.com> * Update rest-api-spec/src/main/resources/rest-api-spec/api/bulk.json Signed-off-by: Stephen Crawford <65832608+scrawfor99@users.noreply.github.com> * Update Apache Lucene to 9.7.0-snapshot-204acc3 (opensearch-project#7887) Signed-off-by: Andriy Redko <andriy.redko@aiven.io> * Add bwc version 2.8.1 (opensearch-project#7942) Signed-off-by: Andriy Redko <andriy.redko@aiven.io> Co-authored-by: opensearch-trigger-bot[bot] <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> * Fix changelog entries (opensearch-project#7946) Move entry for opensearch-project#7321 to correct section and fix the malformed entry from opensearch-project#7452. Signed-off-by: Andrew Ross <andrross@amazon.com> * SegRep with Remote: Add Remote store as a segment replication source (opensearch-project#7653) * SegRep with Remote: Add Remote store as a segment replication source Signed-off-by: Ankit Kala <ankikala@amazon.com> * Fix Gradle check Signed-off-by: Ankit Kala <ankikala@amazon.com> * Retrying Gradle check Signed-off-by: Ankit Kala <ankikala@amazon.com> --------- Signed-off-by: Ankit Kala <ankikala@amazon.com> * rebase Signed-off-by: Stephen Crawford <steecraw@amazon.com> * remove empty line Signed-off-by: Stephen Crawford <steecraw@amazon.com> * Update CHANGELOG.md Signed-off-by: Stephen Crawford <65832608+scrawfor99@users.noreply.github.com> --------- Signed-off-by: Stephen Crawford <steecraw@amazon.com> Signed-off-by: Stephen Crawford <65832608+scrawfor99@users.noreply.github.com> Signed-off-by: Andriy Redko <andriy.redko@aiven.io> Signed-off-by: Andrew Ross <andrross@amazon.com> Signed-off-by: Ankit Kala <ankikala@amazon.com> Co-authored-by: Andriy Redko <andriy.redko@aiven.io> Co-authored-by: opensearch-trigger-bot[bot] <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Co-authored-by: Andrew Ross <andrross@amazon.com> Co-authored-by: Ankit Kala <ankikala@amazon.com>
…arch-project#7321) * Compress and cache cluster state during validate join request Signed-off-by: Aman Khare <amkhar@amazon.com> * Add changelog and license Signed-off-by: Aman Khare <amkhar@amazon.com> * Add javadoc and correct styling Signed-off-by: Aman Khare <amkhar@amazon.com> * Add new handler for sending compressed cluster state in validate join flow and refactor code Signed-off-by: Aman Khare <amkhar@amazon.com> * Refactor util method Signed-off-by: Aman Khare <amkhar@amazon.com> * optimize imports Signed-off-by: Aman Khare <amkhar@amazon.com> * Use cluster state version based cache instead of time based cache Signed-off-by: Aman Khare <amkhar@amazon.com> * style fix Signed-off-by: Aman Khare <amkhar@amazon.com> * fix styling 2 Signed-off-by: Aman Khare <amkhar@amazon.com> * Use concurrent hashmap instead of cache, add UT class for ClusterStateUtils Signed-off-by: Aman Khare <amkhar@amazon.com> * style fix Signed-off-by: Aman Khare <amkhar@amazon.com> * Use AtomicReference instead of ConcurrentHashMap Signed-off-by: Aman Khare <amkhar@amazon.com> * Use method overloading to simplify the caller code Signed-off-by: Aman Khare <amkhar@amazon.com> * Resolve conflicts Signed-off-by: Aman Khare <amkhar@amazon.com> * Change code structure to separate the flow for JoinHelper and PublicationTransportHelper Signed-off-by: Aman Khare <amkhar@amazon.com> * Remove unnecessary input.setVersion line Co-authored-by: Andrew Ross <andrross@amazon.com> Signed-off-by: Aman Khare <85096200+amkhar@users.noreply.github.com> --------- Signed-off-by: Aman Khare <amkhar@amazon.com> Signed-off-by: Aman Khare <85096200+amkhar@users.noreply.github.com> Co-authored-by: Aman Khare <amkhar@amazon.com> Co-authored-by: Andrew Ross <andrross@amazon.com>
Move entry for opensearch-project#7321 to correct section and fix the malformed entry from opensearch-project#7452. Signed-off-by: Andrew Ross <andrross@amazon.com>
…1.0.83 (opensearch-project#7933) * Update network schema Signed-off-by: Stephen Crawford <steecraw@amazon.com> * Update CHANGELOG.md Signed-off-by: Stephen Crawford <65832608+scrawfor99@users.noreply.github.com> * Update CHANGELOG.md Signed-off-by: Stephen Crawford <65832608+scrawfor99@users.noreply.github.com> * Add joni and jcoding to path Signed-off-by: Stephen Crawford <steecraw@amazon.com> * Update buildSrc/src/main/java/org/opensearch/gradle/precommit/ValidateJsonAgainstSchemaTask.java Signed-off-by: Stephen Crawford <65832608+scrawfor99@users.noreply.github.com> * Update buildSrc/src/main/java/org/opensearch/gradle/precommit/ValidateJsonAgainstSchemaTask.java Signed-off-by: Stephen Crawford <65832608+scrawfor99@users.noreply.github.com> * Update buildSrc/src/main/java/org/opensearch/gradle/precommit/ValidateJsonAgainstSchemaTask.java Signed-off-by: Stephen Crawford <65832608+scrawfor99@users.noreply.github.com> * Update rest-api-spec/src/main/resources/rest-api-spec/api/bulk.json Signed-off-by: Stephen Crawford <65832608+scrawfor99@users.noreply.github.com> * Update rest-api-spec/src/main/resources/rest-api-spec/api/bulk.json Signed-off-by: Stephen Crawford <65832608+scrawfor99@users.noreply.github.com> * Update Apache Lucene to 9.7.0-snapshot-204acc3 (opensearch-project#7887) Signed-off-by: Andriy Redko <andriy.redko@aiven.io> * Add bwc version 2.8.1 (opensearch-project#7942) Signed-off-by: Andriy Redko <andriy.redko@aiven.io> Co-authored-by: opensearch-trigger-bot[bot] <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> * Fix changelog entries (opensearch-project#7946) Move entry for opensearch-project#7321 to correct section and fix the malformed entry from opensearch-project#7452. Signed-off-by: Andrew Ross <andrross@amazon.com> * SegRep with Remote: Add Remote store as a segment replication source (opensearch-project#7653) * SegRep with Remote: Add Remote store as a segment replication source Signed-off-by: Ankit Kala <ankikala@amazon.com> * Fix Gradle check Signed-off-by: Ankit Kala <ankikala@amazon.com> * Retrying Gradle check Signed-off-by: Ankit Kala <ankikala@amazon.com> --------- Signed-off-by: Ankit Kala <ankikala@amazon.com> * rebase Signed-off-by: Stephen Crawford <steecraw@amazon.com> * remove empty line Signed-off-by: Stephen Crawford <steecraw@amazon.com> * Update CHANGELOG.md Signed-off-by: Stephen Crawford <65832608+scrawfor99@users.noreply.github.com> --------- Signed-off-by: Stephen Crawford <steecraw@amazon.com> Signed-off-by: Stephen Crawford <65832608+scrawfor99@users.noreply.github.com> Signed-off-by: Andriy Redko <andriy.redko@aiven.io> Signed-off-by: Andrew Ross <andrross@amazon.com> Signed-off-by: Ankit Kala <ankikala@amazon.com> Co-authored-by: Andriy Redko <andriy.redko@aiven.io> Co-authored-by: opensearch-trigger-bot[bot] <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Co-authored-by: Andrew Ross <andrross@amazon.com> Co-authored-by: Ankit Kala <ankikala@amazon.com>
…arch-project#7321) * Compress and cache cluster state during validate join request Signed-off-by: Aman Khare <amkhar@amazon.com> * Add changelog and license Signed-off-by: Aman Khare <amkhar@amazon.com> * Add javadoc and correct styling Signed-off-by: Aman Khare <amkhar@amazon.com> * Add new handler for sending compressed cluster state in validate join flow and refactor code Signed-off-by: Aman Khare <amkhar@amazon.com> * Refactor util method Signed-off-by: Aman Khare <amkhar@amazon.com> * optimize imports Signed-off-by: Aman Khare <amkhar@amazon.com> * Use cluster state version based cache instead of time based cache Signed-off-by: Aman Khare <amkhar@amazon.com> * style fix Signed-off-by: Aman Khare <amkhar@amazon.com> * fix styling 2 Signed-off-by: Aman Khare <amkhar@amazon.com> * Use concurrent hashmap instead of cache, add UT class for ClusterStateUtils Signed-off-by: Aman Khare <amkhar@amazon.com> * style fix Signed-off-by: Aman Khare <amkhar@amazon.com> * Use AtomicReference instead of ConcurrentHashMap Signed-off-by: Aman Khare <amkhar@amazon.com> * Use method overloading to simplify the caller code Signed-off-by: Aman Khare <amkhar@amazon.com> * Resolve conflicts Signed-off-by: Aman Khare <amkhar@amazon.com> * Change code structure to separate the flow for JoinHelper and PublicationTransportHelper Signed-off-by: Aman Khare <amkhar@amazon.com> * Remove unnecessary input.setVersion line Co-authored-by: Andrew Ross <andrross@amazon.com> Signed-off-by: Aman Khare <85096200+amkhar@users.noreply.github.com> --------- Signed-off-by: Aman Khare <amkhar@amazon.com> Signed-off-by: Aman Khare <85096200+amkhar@users.noreply.github.com> Co-authored-by: Aman Khare <amkhar@amazon.com> Co-authored-by: Andrew Ross <andrross@amazon.com> (cherry picked from commit b17c88c)
…arch-project#7321) * Compress and cache cluster state during validate join request Signed-off-by: Aman Khare <amkhar@amazon.com> * Add changelog and license Signed-off-by: Aman Khare <amkhar@amazon.com> * Add javadoc and correct styling Signed-off-by: Aman Khare <amkhar@amazon.com> * Add new handler for sending compressed cluster state in validate join flow and refactor code Signed-off-by: Aman Khare <amkhar@amazon.com> * Refactor util method Signed-off-by: Aman Khare <amkhar@amazon.com> * optimize imports Signed-off-by: Aman Khare <amkhar@amazon.com> * Use cluster state version based cache instead of time based cache Signed-off-by: Aman Khare <amkhar@amazon.com> * style fix Signed-off-by: Aman Khare <amkhar@amazon.com> * fix styling 2 Signed-off-by: Aman Khare <amkhar@amazon.com> * Use concurrent hashmap instead of cache, add UT class for ClusterStateUtils Signed-off-by: Aman Khare <amkhar@amazon.com> * style fix Signed-off-by: Aman Khare <amkhar@amazon.com> * Use AtomicReference instead of ConcurrentHashMap Signed-off-by: Aman Khare <amkhar@amazon.com> * Use method overloading to simplify the caller code Signed-off-by: Aman Khare <amkhar@amazon.com> * Resolve conflicts Signed-off-by: Aman Khare <amkhar@amazon.com> * Change code structure to separate the flow for JoinHelper and PublicationTransportHelper Signed-off-by: Aman Khare <amkhar@amazon.com> * Remove unnecessary input.setVersion line Co-authored-by: Andrew Ross <andrross@amazon.com> Signed-off-by: Aman Khare <85096200+amkhar@users.noreply.github.com> --------- Signed-off-by: Aman Khare <amkhar@amazon.com> Signed-off-by: Aman Khare <85096200+amkhar@users.noreply.github.com> Co-authored-by: Aman Khare <amkhar@amazon.com> Co-authored-by: Andrew Ross <andrross@amazon.com> (cherry picked from commit b17c88c)
…arch-project#7321) * Compress and cache cluster state during validate join request Signed-off-by: Aman Khare <amkhar@amazon.com> * Add changelog and license Signed-off-by: Aman Khare <amkhar@amazon.com> * Add javadoc and correct styling Signed-off-by: Aman Khare <amkhar@amazon.com> * Add new handler for sending compressed cluster state in validate join flow and refactor code Signed-off-by: Aman Khare <amkhar@amazon.com> * Refactor util method Signed-off-by: Aman Khare <amkhar@amazon.com> * optimize imports Signed-off-by: Aman Khare <amkhar@amazon.com> * Use cluster state version based cache instead of time based cache Signed-off-by: Aman Khare <amkhar@amazon.com> * style fix Signed-off-by: Aman Khare <amkhar@amazon.com> * fix styling 2 Signed-off-by: Aman Khare <amkhar@amazon.com> * Use concurrent hashmap instead of cache, add UT class for ClusterStateUtils Signed-off-by: Aman Khare <amkhar@amazon.com> * style fix Signed-off-by: Aman Khare <amkhar@amazon.com> * Use AtomicReference instead of ConcurrentHashMap Signed-off-by: Aman Khare <amkhar@amazon.com> * Use method overloading to simplify the caller code Signed-off-by: Aman Khare <amkhar@amazon.com> * Resolve conflicts Signed-off-by: Aman Khare <amkhar@amazon.com> * Change code structure to separate the flow for JoinHelper and PublicationTransportHelper Signed-off-by: Aman Khare <amkhar@amazon.com> * Remove unnecessary input.setVersion line Co-authored-by: Andrew Ross <andrross@amazon.com> Signed-off-by: Aman Khare <85096200+amkhar@users.noreply.github.com> --------- Signed-off-by: Aman Khare <amkhar@amazon.com> Signed-off-by: Aman Khare <85096200+amkhar@users.noreply.github.com> Co-authored-by: Aman Khare <amkhar@amazon.com> Co-authored-by: Andrew Ross <andrross@amazon.com> (cherry picked from commit b17c88c)
…arch-project#7321) * Compress and cache cluster state during validate join request Signed-off-by: Aman Khare <amkhar@amazon.com> * Add changelog and license Signed-off-by: Aman Khare <amkhar@amazon.com> * Add javadoc and correct styling Signed-off-by: Aman Khare <amkhar@amazon.com> * Add new handler for sending compressed cluster state in validate join flow and refactor code Signed-off-by: Aman Khare <amkhar@amazon.com> * Refactor util method Signed-off-by: Aman Khare <amkhar@amazon.com> * optimize imports Signed-off-by: Aman Khare <amkhar@amazon.com> * Use cluster state version based cache instead of time based cache Signed-off-by: Aman Khare <amkhar@amazon.com> * style fix Signed-off-by: Aman Khare <amkhar@amazon.com> * fix styling 2 Signed-off-by: Aman Khare <amkhar@amazon.com> * Use concurrent hashmap instead of cache, add UT class for ClusterStateUtils Signed-off-by: Aman Khare <amkhar@amazon.com> * style fix Signed-off-by: Aman Khare <amkhar@amazon.com> * Use AtomicReference instead of ConcurrentHashMap Signed-off-by: Aman Khare <amkhar@amazon.com> * Use method overloading to simplify the caller code Signed-off-by: Aman Khare <amkhar@amazon.com> * Resolve conflicts Signed-off-by: Aman Khare <amkhar@amazon.com> * Change code structure to separate the flow for JoinHelper and PublicationTransportHelper Signed-off-by: Aman Khare <amkhar@amazon.com> * Remove unnecessary input.setVersion line Co-authored-by: Andrew Ross <andrross@amazon.com> Signed-off-by: Aman Khare <85096200+amkhar@users.noreply.github.com> --------- Signed-off-by: Aman Khare <amkhar@amazon.com> Signed-off-by: Aman Khare <85096200+amkhar@users.noreply.github.com> Co-authored-by: Aman Khare <amkhar@amazon.com> Co-authored-by: Andrew Ross <andrross@amazon.com> (cherry picked from commit b17c88c)
…request (#7321) (#7945) * Compress and cache cluster state during validate join request (#7321) * Compress and cache cluster state during validate join request Signed-off-by: Aman Khare <amkhar@amazon.com> * Add changelog and license Signed-off-by: Aman Khare <amkhar@amazon.com> * Add javadoc and correct styling Signed-off-by: Aman Khare <amkhar@amazon.com> * Add new handler for sending compressed cluster state in validate join flow and refactor code Signed-off-by: Aman Khare <amkhar@amazon.com> * Refactor util method Signed-off-by: Aman Khare <amkhar@amazon.com> * optimize imports Signed-off-by: Aman Khare <amkhar@amazon.com> * Use cluster state version based cache instead of time based cache Signed-off-by: Aman Khare <amkhar@amazon.com> * style fix Signed-off-by: Aman Khare <amkhar@amazon.com> * fix styling 2 Signed-off-by: Aman Khare <amkhar@amazon.com> * Use concurrent hashmap instead of cache, add UT class for ClusterStateUtils Signed-off-by: Aman Khare <amkhar@amazon.com> * style fix Signed-off-by: Aman Khare <amkhar@amazon.com> * Use AtomicReference instead of ConcurrentHashMap Signed-off-by: Aman Khare <amkhar@amazon.com> * Use method overloading to simplify the caller code Signed-off-by: Aman Khare <amkhar@amazon.com> * Resolve conflicts Signed-off-by: Aman Khare <amkhar@amazon.com> * Change code structure to separate the flow for JoinHelper and PublicationTransportHelper Signed-off-by: Aman Khare <amkhar@amazon.com> * Remove unnecessary input.setVersion line Co-authored-by: Andrew Ross <andrross@amazon.com> Signed-off-by: Aman Khare <85096200+amkhar@users.noreply.github.com> --------- Signed-off-by: Aman Khare <amkhar@amazon.com> Signed-off-by: Aman Khare <85096200+amkhar@users.noreply.github.com> Co-authored-by: Aman Khare <amkhar@amazon.com> Co-authored-by: Andrew Ross <andrross@amazon.com> (cherry picked from commit b17c88c) * Change version guard to 2.9.0 Signed-off-by: Andrew Ross <andrross@amazon.com> --------- Signed-off-by: Andrew Ross <andrross@amazon.com> Co-authored-by: Aman Khare <85096200+amkhar@users.noreply.github.com>
…request (opensearch-project#7321) (opensearch-project#7945) * Compress and cache cluster state during validate join request (opensearch-project#7321) * Compress and cache cluster state during validate join request Signed-off-by: Aman Khare <amkhar@amazon.com> * Add changelog and license Signed-off-by: Aman Khare <amkhar@amazon.com> * Add javadoc and correct styling Signed-off-by: Aman Khare <amkhar@amazon.com> * Add new handler for sending compressed cluster state in validate join flow and refactor code Signed-off-by: Aman Khare <amkhar@amazon.com> * Refactor util method Signed-off-by: Aman Khare <amkhar@amazon.com> * optimize imports Signed-off-by: Aman Khare <amkhar@amazon.com> * Use cluster state version based cache instead of time based cache Signed-off-by: Aman Khare <amkhar@amazon.com> * style fix Signed-off-by: Aman Khare <amkhar@amazon.com> * fix styling 2 Signed-off-by: Aman Khare <amkhar@amazon.com> * Use concurrent hashmap instead of cache, add UT class for ClusterStateUtils Signed-off-by: Aman Khare <amkhar@amazon.com> * style fix Signed-off-by: Aman Khare <amkhar@amazon.com> * Use AtomicReference instead of ConcurrentHashMap Signed-off-by: Aman Khare <amkhar@amazon.com> * Use method overloading to simplify the caller code Signed-off-by: Aman Khare <amkhar@amazon.com> * Resolve conflicts Signed-off-by: Aman Khare <amkhar@amazon.com> * Change code structure to separate the flow for JoinHelper and PublicationTransportHelper Signed-off-by: Aman Khare <amkhar@amazon.com> * Remove unnecessary input.setVersion line Co-authored-by: Andrew Ross <andrross@amazon.com> Signed-off-by: Aman Khare <85096200+amkhar@users.noreply.github.com> --------- Signed-off-by: Aman Khare <amkhar@amazon.com> Signed-off-by: Aman Khare <85096200+amkhar@users.noreply.github.com> Co-authored-by: Aman Khare <amkhar@amazon.com> Co-authored-by: Andrew Ross <andrross@amazon.com> (cherry picked from commit b17c88c) * Change version guard to 2.9.0 Signed-off-by: Andrew Ross <andrross@amazon.com> --------- Signed-off-by: Andrew Ross <andrross@amazon.com> Co-authored-by: Aman Khare <85096200+amkhar@users.noreply.github.com>
…1.0.83 (opensearch-project#7933) * Update network schema Signed-off-by: Stephen Crawford <steecraw@amazon.com> * Update CHANGELOG.md Signed-off-by: Stephen Crawford <65832608+scrawfor99@users.noreply.github.com> * Update CHANGELOG.md Signed-off-by: Stephen Crawford <65832608+scrawfor99@users.noreply.github.com> * Add joni and jcoding to path Signed-off-by: Stephen Crawford <steecraw@amazon.com> * Update buildSrc/src/main/java/org/opensearch/gradle/precommit/ValidateJsonAgainstSchemaTask.java Signed-off-by: Stephen Crawford <65832608+scrawfor99@users.noreply.github.com> * Update buildSrc/src/main/java/org/opensearch/gradle/precommit/ValidateJsonAgainstSchemaTask.java Signed-off-by: Stephen Crawford <65832608+scrawfor99@users.noreply.github.com> * Update buildSrc/src/main/java/org/opensearch/gradle/precommit/ValidateJsonAgainstSchemaTask.java Signed-off-by: Stephen Crawford <65832608+scrawfor99@users.noreply.github.com> * Update rest-api-spec/src/main/resources/rest-api-spec/api/bulk.json Signed-off-by: Stephen Crawford <65832608+scrawfor99@users.noreply.github.com> * Update rest-api-spec/src/main/resources/rest-api-spec/api/bulk.json Signed-off-by: Stephen Crawford <65832608+scrawfor99@users.noreply.github.com> * Update Apache Lucene to 9.7.0-snapshot-204acc3 (opensearch-project#7887) Signed-off-by: Andriy Redko <andriy.redko@aiven.io> * Add bwc version 2.8.1 (opensearch-project#7942) Signed-off-by: Andriy Redko <andriy.redko@aiven.io> Co-authored-by: opensearch-trigger-bot[bot] <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> * Fix changelog entries (opensearch-project#7946) Move entry for opensearch-project#7321 to correct section and fix the malformed entry from opensearch-project#7452. Signed-off-by: Andrew Ross <andrross@amazon.com> * SegRep with Remote: Add Remote store as a segment replication source (opensearch-project#7653) * SegRep with Remote: Add Remote store as a segment replication source Signed-off-by: Ankit Kala <ankikala@amazon.com> * Fix Gradle check Signed-off-by: Ankit Kala <ankikala@amazon.com> * Retrying Gradle check Signed-off-by: Ankit Kala <ankikala@amazon.com> --------- Signed-off-by: Ankit Kala <ankikala@amazon.com> * rebase Signed-off-by: Stephen Crawford <steecraw@amazon.com> * remove empty line Signed-off-by: Stephen Crawford <steecraw@amazon.com> * Update CHANGELOG.md Signed-off-by: Stephen Crawford <65832608+scrawfor99@users.noreply.github.com> --------- Signed-off-by: Stephen Crawford <steecraw@amazon.com> Signed-off-by: Stephen Crawford <65832608+scrawfor99@users.noreply.github.com> Signed-off-by: Andriy Redko <andriy.redko@aiven.io> Signed-off-by: Andrew Ross <andrross@amazon.com> Signed-off-by: Ankit Kala <ankikala@amazon.com> Co-authored-by: Andriy Redko <andriy.redko@aiven.io> Co-authored-by: opensearch-trigger-bot[bot] <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Co-authored-by: Andrew Ross <andrross@amazon.com> Co-authored-by: Ankit Kala <ankikala@amazon.com> Signed-off-by: Rishab Nahata <rnnahata@amazon.com>
…arch-project#7321) * Compress and cache cluster state during validate join request Signed-off-by: Aman Khare <amkhar@amazon.com> * Add changelog and license Signed-off-by: Aman Khare <amkhar@amazon.com> * Add javadoc and correct styling Signed-off-by: Aman Khare <amkhar@amazon.com> * Add new handler for sending compressed cluster state in validate join flow and refactor code Signed-off-by: Aman Khare <amkhar@amazon.com> * Refactor util method Signed-off-by: Aman Khare <amkhar@amazon.com> * optimize imports Signed-off-by: Aman Khare <amkhar@amazon.com> * Use cluster state version based cache instead of time based cache Signed-off-by: Aman Khare <amkhar@amazon.com> * style fix Signed-off-by: Aman Khare <amkhar@amazon.com> * fix styling 2 Signed-off-by: Aman Khare <amkhar@amazon.com> * Use concurrent hashmap instead of cache, add UT class for ClusterStateUtils Signed-off-by: Aman Khare <amkhar@amazon.com> * style fix Signed-off-by: Aman Khare <amkhar@amazon.com> * Use AtomicReference instead of ConcurrentHashMap Signed-off-by: Aman Khare <amkhar@amazon.com> * Use method overloading to simplify the caller code Signed-off-by: Aman Khare <amkhar@amazon.com> * Resolve conflicts Signed-off-by: Aman Khare <amkhar@amazon.com> * Change code structure to separate the flow for JoinHelper and PublicationTransportHelper Signed-off-by: Aman Khare <amkhar@amazon.com> * Remove unnecessary input.setVersion line Co-authored-by: Andrew Ross <andrross@amazon.com> Signed-off-by: Aman Khare <85096200+amkhar@users.noreply.github.com> --------- Signed-off-by: Aman Khare <amkhar@amazon.com> Signed-off-by: Aman Khare <85096200+amkhar@users.noreply.github.com> Co-authored-by: Aman Khare <amkhar@amazon.com> Co-authored-by: Andrew Ross <andrross@amazon.com> Signed-off-by: Shivansh Arora <hishiv@amazon.com>
Move entry for opensearch-project#7321 to correct section and fix the malformed entry from opensearch-project#7452. Signed-off-by: Andrew Ross <andrross@amazon.com> Signed-off-by: Shivansh Arora <hishiv@amazon.com>
…1.0.83 (opensearch-project#7933) * Update network schema Signed-off-by: Stephen Crawford <steecraw@amazon.com> * Update CHANGELOG.md Signed-off-by: Stephen Crawford <65832608+scrawfor99@users.noreply.github.com> * Update CHANGELOG.md Signed-off-by: Stephen Crawford <65832608+scrawfor99@users.noreply.github.com> * Add joni and jcoding to path Signed-off-by: Stephen Crawford <steecraw@amazon.com> * Update buildSrc/src/main/java/org/opensearch/gradle/precommit/ValidateJsonAgainstSchemaTask.java Signed-off-by: Stephen Crawford <65832608+scrawfor99@users.noreply.github.com> * Update buildSrc/src/main/java/org/opensearch/gradle/precommit/ValidateJsonAgainstSchemaTask.java Signed-off-by: Stephen Crawford <65832608+scrawfor99@users.noreply.github.com> * Update buildSrc/src/main/java/org/opensearch/gradle/precommit/ValidateJsonAgainstSchemaTask.java Signed-off-by: Stephen Crawford <65832608+scrawfor99@users.noreply.github.com> * Update rest-api-spec/src/main/resources/rest-api-spec/api/bulk.json Signed-off-by: Stephen Crawford <65832608+scrawfor99@users.noreply.github.com> * Update rest-api-spec/src/main/resources/rest-api-spec/api/bulk.json Signed-off-by: Stephen Crawford <65832608+scrawfor99@users.noreply.github.com> * Update Apache Lucene to 9.7.0-snapshot-204acc3 (opensearch-project#7887) Signed-off-by: Andriy Redko <andriy.redko@aiven.io> * Add bwc version 2.8.1 (opensearch-project#7942) Signed-off-by: Andriy Redko <andriy.redko@aiven.io> Co-authored-by: opensearch-trigger-bot[bot] <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> * Fix changelog entries (opensearch-project#7946) Move entry for opensearch-project#7321 to correct section and fix the malformed entry from opensearch-project#7452. Signed-off-by: Andrew Ross <andrross@amazon.com> * SegRep with Remote: Add Remote store as a segment replication source (opensearch-project#7653) * SegRep with Remote: Add Remote store as a segment replication source Signed-off-by: Ankit Kala <ankikala@amazon.com> * Fix Gradle check Signed-off-by: Ankit Kala <ankikala@amazon.com> * Retrying Gradle check Signed-off-by: Ankit Kala <ankikala@amazon.com> --------- Signed-off-by: Ankit Kala <ankikala@amazon.com> * rebase Signed-off-by: Stephen Crawford <steecraw@amazon.com> * remove empty line Signed-off-by: Stephen Crawford <steecraw@amazon.com> * Update CHANGELOG.md Signed-off-by: Stephen Crawford <65832608+scrawfor99@users.noreply.github.com> --------- Signed-off-by: Stephen Crawford <steecraw@amazon.com> Signed-off-by: Stephen Crawford <65832608+scrawfor99@users.noreply.github.com> Signed-off-by: Andriy Redko <andriy.redko@aiven.io> Signed-off-by: Andrew Ross <andrross@amazon.com> Signed-off-by: Ankit Kala <ankikala@amazon.com> Co-authored-by: Andriy Redko <andriy.redko@aiven.io> Co-authored-by: opensearch-trigger-bot[bot] <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Co-authored-by: Andrew Ross <andrross@amazon.com> Co-authored-by: Ankit Kala <ankikala@amazon.com> Signed-off-by: Shivansh Arora <hishiv@amazon.com>
Description
ValidateJoinRequest flow sends the full cluster state to every node by writing it on the stream separately for each node. We can improve this by compressing the cluster state first and storing it in a cache so the same serialized data is written over and over on different tcp channels instead of writing it fresh.
We're seeing good amount of improvement if we refresh the serialzed state cache every 30s and use similar compression technique used during cluster state publishing (in PublicationTransportHandler). Just with compression, gain is less but we can see it in flamegraph. With caching & compression, gain is huge. Overall memory allocations for sendValidateJoinRequest flow is reduced to 1/7th
ToDo : Unit tests and more fine tuning to be done. [DONE]
Pending Action Items
Issues Resolved
#5100
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.