-
Notifications
You must be signed in to change notification settings - Fork 2k
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 <[email protected]>
Signed-off-by: Aman Khare <[email protected]>
Signed-off-by: Aman Khare <[email protected]>
… flow and refactor code Signed-off-by: Aman Khare <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]> Signed-off-by: Aman Khare <[email protected]>
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 <[email protected]> * Add changelog and license Signed-off-by: Aman Khare <[email protected]> * Add javadoc and correct styling Signed-off-by: Aman Khare <[email protected]> * Add new handler for sending compressed cluster state in validate join flow and refactor code Signed-off-by: Aman Khare <[email protected]> * Refactor util method Signed-off-by: Aman Khare <[email protected]> * optimize imports Signed-off-by: Aman Khare <[email protected]> * Use cluster state version based cache instead of time based cache Signed-off-by: Aman Khare <[email protected]> * style fix Signed-off-by: Aman Khare <[email protected]> * fix styling 2 Signed-off-by: Aman Khare <[email protected]> * Use concurrent hashmap instead of cache, add UT class for ClusterStateUtils Signed-off-by: Aman Khare <[email protected]> * style fix Signed-off-by: Aman Khare <[email protected]> * Use AtomicReference instead of ConcurrentHashMap Signed-off-by: Aman Khare <[email protected]> * Use method overloading to simplify the caller code Signed-off-by: Aman Khare <[email protected]> * Resolve conflicts Signed-off-by: Aman Khare <[email protected]> * Change code structure to separate the flow for JoinHelper and PublicationTransportHelper Signed-off-by: Aman Khare <[email protected]> * Remove unnecessary input.setVersion line Co-authored-by: Andrew Ross <[email protected]> Signed-off-by: Aman Khare <[email protected]> --------- Signed-off-by: Aman Khare <[email protected]> Signed-off-by: Aman Khare <[email protected]> Co-authored-by: Aman Khare <[email protected]> Co-authored-by: Andrew Ross <[email protected]> (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 <[email protected]>
Move entry for #7321 to correct section and fix the malformed entry from #7452. Signed-off-by: Andrew Ross <[email protected]>
Move entry for opensearch-project#7321 to correct section and fix the malformed entry from opensearch-project#7452. Signed-off-by: Andrew Ross <[email protected]>
Move entry for opensearch-project#7321 to correct section and fix the malformed entry from opensearch-project#7452. Signed-off-by: Andrew Ross <[email protected]>
…1.0.83 (#7933) * Update network schema Signed-off-by: Stephen Crawford <[email protected]> * Update CHANGELOG.md Signed-off-by: Stephen Crawford <[email protected]> * Update CHANGELOG.md Signed-off-by: Stephen Crawford <[email protected]> * Add joni and jcoding to path Signed-off-by: Stephen Crawford <[email protected]> * Update buildSrc/src/main/java/org/opensearch/gradle/precommit/ValidateJsonAgainstSchemaTask.java Signed-off-by: Stephen Crawford <[email protected]> * Update buildSrc/src/main/java/org/opensearch/gradle/precommit/ValidateJsonAgainstSchemaTask.java Signed-off-by: Stephen Crawford <[email protected]> * Update buildSrc/src/main/java/org/opensearch/gradle/precommit/ValidateJsonAgainstSchemaTask.java Signed-off-by: Stephen Crawford <[email protected]> * Update rest-api-spec/src/main/resources/rest-api-spec/api/bulk.json Signed-off-by: Stephen Crawford <[email protected]> * Update rest-api-spec/src/main/resources/rest-api-spec/api/bulk.json Signed-off-by: Stephen Crawford <[email protected]> * Update Apache Lucene to 9.7.0-snapshot-204acc3 (#7887) Signed-off-by: Andriy Redko <[email protected]> * Add bwc version 2.8.1 (#7942) Signed-off-by: Andriy Redko <[email protected]> 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 <[email protected]> * 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 <[email protected]> * Fix Gradle check Signed-off-by: Ankit Kala <[email protected]> * Retrying Gradle check Signed-off-by: Ankit Kala <[email protected]> --------- Signed-off-by: Ankit Kala <[email protected]> * rebase Signed-off-by: Stephen Crawford <[email protected]> * remove empty line Signed-off-by: Stephen Crawford <[email protected]> * Update CHANGELOG.md Signed-off-by: Stephen Crawford <[email protected]> --------- Signed-off-by: Stephen Crawford <[email protected]> Signed-off-by: Stephen Crawford <[email protected]> Signed-off-by: Andriy Redko <[email protected]> Signed-off-by: Andrew Ross <[email protected]> Signed-off-by: Ankit Kala <[email protected]> Co-authored-by: Andriy Redko <[email protected]> Co-authored-by: opensearch-trigger-bot[bot] <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Co-authored-by: Andrew Ross <[email protected]> Co-authored-by: Ankit Kala <[email protected]>
…arch-project#7321) * Compress and cache cluster state during validate join request Signed-off-by: Aman Khare <[email protected]> * Add changelog and license Signed-off-by: Aman Khare <[email protected]> * Add javadoc and correct styling Signed-off-by: Aman Khare <[email protected]> * Add new handler for sending compressed cluster state in validate join flow and refactor code Signed-off-by: Aman Khare <[email protected]> * Refactor util method Signed-off-by: Aman Khare <[email protected]> * optimize imports Signed-off-by: Aman Khare <[email protected]> * Use cluster state version based cache instead of time based cache Signed-off-by: Aman Khare <[email protected]> * style fix Signed-off-by: Aman Khare <[email protected]> * fix styling 2 Signed-off-by: Aman Khare <[email protected]> * Use concurrent hashmap instead of cache, add UT class for ClusterStateUtils Signed-off-by: Aman Khare <[email protected]> * style fix Signed-off-by: Aman Khare <[email protected]> * Use AtomicReference instead of ConcurrentHashMap Signed-off-by: Aman Khare <[email protected]> * Use method overloading to simplify the caller code Signed-off-by: Aman Khare <[email protected]> * Resolve conflicts Signed-off-by: Aman Khare <[email protected]> * Change code structure to separate the flow for JoinHelper and PublicationTransportHelper Signed-off-by: Aman Khare <[email protected]> * Remove unnecessary input.setVersion line Co-authored-by: Andrew Ross <[email protected]> Signed-off-by: Aman Khare <[email protected]> --------- Signed-off-by: Aman Khare <[email protected]> Signed-off-by: Aman Khare <[email protected]> Co-authored-by: Aman Khare <[email protected]> Co-authored-by: Andrew Ross <[email protected]> (cherry picked from commit b17c88c)
…1.0.83 (opensearch-project#7933) * Update network schema Signed-off-by: Stephen Crawford <[email protected]> * Update CHANGELOG.md Signed-off-by: Stephen Crawford <[email protected]> * Update CHANGELOG.md Signed-off-by: Stephen Crawford <[email protected]> * Add joni and jcoding to path Signed-off-by: Stephen Crawford <[email protected]> * Update buildSrc/src/main/java/org/opensearch/gradle/precommit/ValidateJsonAgainstSchemaTask.java Signed-off-by: Stephen Crawford <[email protected]> * Update buildSrc/src/main/java/org/opensearch/gradle/precommit/ValidateJsonAgainstSchemaTask.java Signed-off-by: Stephen Crawford <[email protected]> * Update buildSrc/src/main/java/org/opensearch/gradle/precommit/ValidateJsonAgainstSchemaTask.java Signed-off-by: Stephen Crawford <[email protected]> * Update rest-api-spec/src/main/resources/rest-api-spec/api/bulk.json Signed-off-by: Stephen Crawford <[email protected]> * Update rest-api-spec/src/main/resources/rest-api-spec/api/bulk.json Signed-off-by: Stephen Crawford <[email protected]> * Update Apache Lucene to 9.7.0-snapshot-204acc3 (opensearch-project#7887) Signed-off-by: Andriy Redko <[email protected]> * Add bwc version 2.8.1 (opensearch-project#7942) Signed-off-by: Andriy Redko <[email protected]> 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 <[email protected]> * 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 <[email protected]> * Fix Gradle check Signed-off-by: Ankit Kala <[email protected]> * Retrying Gradle check Signed-off-by: Ankit Kala <[email protected]> --------- Signed-off-by: Ankit Kala <[email protected]> * rebase Signed-off-by: Stephen Crawford <[email protected]> * remove empty line Signed-off-by: Stephen Crawford <[email protected]> * Update CHANGELOG.md Signed-off-by: Stephen Crawford <[email protected]> --------- Signed-off-by: Stephen Crawford <[email protected]> Signed-off-by: Stephen Crawford <[email protected]> Signed-off-by: Andriy Redko <[email protected]> Signed-off-by: Andrew Ross <[email protected]> Signed-off-by: Ankit Kala <[email protected]> Co-authored-by: Andriy Redko <[email protected]> Co-authored-by: opensearch-trigger-bot[bot] <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Co-authored-by: Andrew Ross <[email protected]> Co-authored-by: Ankit Kala <[email protected]>
…arch-project#7321) * Compress and cache cluster state during validate join request Signed-off-by: Aman Khare <[email protected]> * Add changelog and license Signed-off-by: Aman Khare <[email protected]> * Add javadoc and correct styling Signed-off-by: Aman Khare <[email protected]> * Add new handler for sending compressed cluster state in validate join flow and refactor code Signed-off-by: Aman Khare <[email protected]> * Refactor util method Signed-off-by: Aman Khare <[email protected]> * optimize imports Signed-off-by: Aman Khare <[email protected]> * Use cluster state version based cache instead of time based cache Signed-off-by: Aman Khare <[email protected]> * style fix Signed-off-by: Aman Khare <[email protected]> * fix styling 2 Signed-off-by: Aman Khare <[email protected]> * Use concurrent hashmap instead of cache, add UT class for ClusterStateUtils Signed-off-by: Aman Khare <[email protected]> * style fix Signed-off-by: Aman Khare <[email protected]> * Use AtomicReference instead of ConcurrentHashMap Signed-off-by: Aman Khare <[email protected]> * Use method overloading to simplify the caller code Signed-off-by: Aman Khare <[email protected]> * Resolve conflicts Signed-off-by: Aman Khare <[email protected]> * Change code structure to separate the flow for JoinHelper and PublicationTransportHelper Signed-off-by: Aman Khare <[email protected]> * Remove unnecessary input.setVersion line Co-authored-by: Andrew Ross <[email protected]> Signed-off-by: Aman Khare <[email protected]> --------- Signed-off-by: Aman Khare <[email protected]> Signed-off-by: Aman Khare <[email protected]> Co-authored-by: Aman Khare <[email protected]> Co-authored-by: Andrew Ross <[email protected]>
Move entry for opensearch-project#7321 to correct section and fix the malformed entry from opensearch-project#7452. Signed-off-by: Andrew Ross <[email protected]>
…1.0.83 (opensearch-project#7933) * Update network schema Signed-off-by: Stephen Crawford <[email protected]> * Update CHANGELOG.md Signed-off-by: Stephen Crawford <[email protected]> * Update CHANGELOG.md Signed-off-by: Stephen Crawford <[email protected]> * Add joni and jcoding to path Signed-off-by: Stephen Crawford <[email protected]> * Update buildSrc/src/main/java/org/opensearch/gradle/precommit/ValidateJsonAgainstSchemaTask.java Signed-off-by: Stephen Crawford <[email protected]> * Update buildSrc/src/main/java/org/opensearch/gradle/precommit/ValidateJsonAgainstSchemaTask.java Signed-off-by: Stephen Crawford <[email protected]> * Update buildSrc/src/main/java/org/opensearch/gradle/precommit/ValidateJsonAgainstSchemaTask.java Signed-off-by: Stephen Crawford <[email protected]> * Update rest-api-spec/src/main/resources/rest-api-spec/api/bulk.json Signed-off-by: Stephen Crawford <[email protected]> * Update rest-api-spec/src/main/resources/rest-api-spec/api/bulk.json Signed-off-by: Stephen Crawford <[email protected]> * Update Apache Lucene to 9.7.0-snapshot-204acc3 (opensearch-project#7887) Signed-off-by: Andriy Redko <[email protected]> * Add bwc version 2.8.1 (opensearch-project#7942) Signed-off-by: Andriy Redko <[email protected]> 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 <[email protected]> * 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 <[email protected]> * Fix Gradle check Signed-off-by: Ankit Kala <[email protected]> * Retrying Gradle check Signed-off-by: Ankit Kala <[email protected]> --------- Signed-off-by: Ankit Kala <[email protected]> * rebase Signed-off-by: Stephen Crawford <[email protected]> * remove empty line Signed-off-by: Stephen Crawford <[email protected]> * Update CHANGELOG.md Signed-off-by: Stephen Crawford <[email protected]> --------- Signed-off-by: Stephen Crawford <[email protected]> Signed-off-by: Stephen Crawford <[email protected]> Signed-off-by: Andriy Redko <[email protected]> Signed-off-by: Andrew Ross <[email protected]> Signed-off-by: Ankit Kala <[email protected]> Co-authored-by: Andriy Redko <[email protected]> Co-authored-by: opensearch-trigger-bot[bot] <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Co-authored-by: Andrew Ross <[email protected]> Co-authored-by: Ankit Kala <[email protected]>
…arch-project#7321) * Compress and cache cluster state during validate join request Signed-off-by: Aman Khare <[email protected]> * Add changelog and license Signed-off-by: Aman Khare <[email protected]> * Add javadoc and correct styling Signed-off-by: Aman Khare <[email protected]> * Add new handler for sending compressed cluster state in validate join flow and refactor code Signed-off-by: Aman Khare <[email protected]> * Refactor util method Signed-off-by: Aman Khare <[email protected]> * optimize imports Signed-off-by: Aman Khare <[email protected]> * Use cluster state version based cache instead of time based cache Signed-off-by: Aman Khare <[email protected]> * style fix Signed-off-by: Aman Khare <[email protected]> * fix styling 2 Signed-off-by: Aman Khare <[email protected]> * Use concurrent hashmap instead of cache, add UT class for ClusterStateUtils Signed-off-by: Aman Khare <[email protected]> * style fix Signed-off-by: Aman Khare <[email protected]> * Use AtomicReference instead of ConcurrentHashMap Signed-off-by: Aman Khare <[email protected]> * Use method overloading to simplify the caller code Signed-off-by: Aman Khare <[email protected]> * Resolve conflicts Signed-off-by: Aman Khare <[email protected]> * Change code structure to separate the flow for JoinHelper and PublicationTransportHelper Signed-off-by: Aman Khare <[email protected]> * Remove unnecessary input.setVersion line Co-authored-by: Andrew Ross <[email protected]> Signed-off-by: Aman Khare <[email protected]> --------- Signed-off-by: Aman Khare <[email protected]> Signed-off-by: Aman Khare <[email protected]> Co-authored-by: Aman Khare <[email protected]> Co-authored-by: Andrew Ross <[email protected]> (cherry picked from commit b17c88c)
…arch-project#7321) * Compress and cache cluster state during validate join request Signed-off-by: Aman Khare <[email protected]> * Add changelog and license Signed-off-by: Aman Khare <[email protected]> * Add javadoc and correct styling Signed-off-by: Aman Khare <[email protected]> * Add new handler for sending compressed cluster state in validate join flow and refactor code Signed-off-by: Aman Khare <[email protected]> * Refactor util method Signed-off-by: Aman Khare <[email protected]> * optimize imports Signed-off-by: Aman Khare <[email protected]> * Use cluster state version based cache instead of time based cache Signed-off-by: Aman Khare <[email protected]> * style fix Signed-off-by: Aman Khare <[email protected]> * fix styling 2 Signed-off-by: Aman Khare <[email protected]> * Use concurrent hashmap instead of cache, add UT class for ClusterStateUtils Signed-off-by: Aman Khare <[email protected]> * style fix Signed-off-by: Aman Khare <[email protected]> * Use AtomicReference instead of ConcurrentHashMap Signed-off-by: Aman Khare <[email protected]> * Use method overloading to simplify the caller code Signed-off-by: Aman Khare <[email protected]> * Resolve conflicts Signed-off-by: Aman Khare <[email protected]> * Change code structure to separate the flow for JoinHelper and PublicationTransportHelper Signed-off-by: Aman Khare <[email protected]> * Remove unnecessary input.setVersion line Co-authored-by: Andrew Ross <[email protected]> Signed-off-by: Aman Khare <[email protected]> --------- Signed-off-by: Aman Khare <[email protected]> Signed-off-by: Aman Khare <[email protected]> Co-authored-by: Aman Khare <[email protected]> Co-authored-by: Andrew Ross <[email protected]> (cherry picked from commit b17c88c)
…arch-project#7321) * Compress and cache cluster state during validate join request Signed-off-by: Aman Khare <[email protected]> * Add changelog and license Signed-off-by: Aman Khare <[email protected]> * Add javadoc and correct styling Signed-off-by: Aman Khare <[email protected]> * Add new handler for sending compressed cluster state in validate join flow and refactor code Signed-off-by: Aman Khare <[email protected]> * Refactor util method Signed-off-by: Aman Khare <[email protected]> * optimize imports Signed-off-by: Aman Khare <[email protected]> * Use cluster state version based cache instead of time based cache Signed-off-by: Aman Khare <[email protected]> * style fix Signed-off-by: Aman Khare <[email protected]> * fix styling 2 Signed-off-by: Aman Khare <[email protected]> * Use concurrent hashmap instead of cache, add UT class for ClusterStateUtils Signed-off-by: Aman Khare <[email protected]> * style fix Signed-off-by: Aman Khare <[email protected]> * Use AtomicReference instead of ConcurrentHashMap Signed-off-by: Aman Khare <[email protected]> * Use method overloading to simplify the caller code Signed-off-by: Aman Khare <[email protected]> * Resolve conflicts Signed-off-by: Aman Khare <[email protected]> * Change code structure to separate the flow for JoinHelper and PublicationTransportHelper Signed-off-by: Aman Khare <[email protected]> * Remove unnecessary input.setVersion line Co-authored-by: Andrew Ross <[email protected]> Signed-off-by: Aman Khare <[email protected]> --------- Signed-off-by: Aman Khare <[email protected]> Signed-off-by: Aman Khare <[email protected]> Co-authored-by: Aman Khare <[email protected]> Co-authored-by: Andrew Ross <[email protected]> (cherry picked from commit b17c88c)
…arch-project#7321) * Compress and cache cluster state during validate join request Signed-off-by: Aman Khare <[email protected]> * Add changelog and license Signed-off-by: Aman Khare <[email protected]> * Add javadoc and correct styling Signed-off-by: Aman Khare <[email protected]> * Add new handler for sending compressed cluster state in validate join flow and refactor code Signed-off-by: Aman Khare <[email protected]> * Refactor util method Signed-off-by: Aman Khare <[email protected]> * optimize imports Signed-off-by: Aman Khare <[email protected]> * Use cluster state version based cache instead of time based cache Signed-off-by: Aman Khare <[email protected]> * style fix Signed-off-by: Aman Khare <[email protected]> * fix styling 2 Signed-off-by: Aman Khare <[email protected]> * Use concurrent hashmap instead of cache, add UT class for ClusterStateUtils Signed-off-by: Aman Khare <[email protected]> * style fix Signed-off-by: Aman Khare <[email protected]> * Use AtomicReference instead of ConcurrentHashMap Signed-off-by: Aman Khare <[email protected]> * Use method overloading to simplify the caller code Signed-off-by: Aman Khare <[email protected]> * Resolve conflicts Signed-off-by: Aman Khare <[email protected]> * Change code structure to separate the flow for JoinHelper and PublicationTransportHelper Signed-off-by: Aman Khare <[email protected]> * Remove unnecessary input.setVersion line Co-authored-by: Andrew Ross <[email protected]> Signed-off-by: Aman Khare <[email protected]> --------- Signed-off-by: Aman Khare <[email protected]> Signed-off-by: Aman Khare <[email protected]> Co-authored-by: Aman Khare <[email protected]> Co-authored-by: Andrew Ross <[email protected]> (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 <[email protected]> * Add changelog and license Signed-off-by: Aman Khare <[email protected]> * Add javadoc and correct styling Signed-off-by: Aman Khare <[email protected]> * Add new handler for sending compressed cluster state in validate join flow and refactor code Signed-off-by: Aman Khare <[email protected]> * Refactor util method Signed-off-by: Aman Khare <[email protected]> * optimize imports Signed-off-by: Aman Khare <[email protected]> * Use cluster state version based cache instead of time based cache Signed-off-by: Aman Khare <[email protected]> * style fix Signed-off-by: Aman Khare <[email protected]> * fix styling 2 Signed-off-by: Aman Khare <[email protected]> * Use concurrent hashmap instead of cache, add UT class for ClusterStateUtils Signed-off-by: Aman Khare <[email protected]> * style fix Signed-off-by: Aman Khare <[email protected]> * Use AtomicReference instead of ConcurrentHashMap Signed-off-by: Aman Khare <[email protected]> * Use method overloading to simplify the caller code Signed-off-by: Aman Khare <[email protected]> * Resolve conflicts Signed-off-by: Aman Khare <[email protected]> * Change code structure to separate the flow for JoinHelper and PublicationTransportHelper Signed-off-by: Aman Khare <[email protected]> * Remove unnecessary input.setVersion line Co-authored-by: Andrew Ross <[email protected]> Signed-off-by: Aman Khare <[email protected]> --------- Signed-off-by: Aman Khare <[email protected]> Signed-off-by: Aman Khare <[email protected]> Co-authored-by: Aman Khare <[email protected]> Co-authored-by: Andrew Ross <[email protected]> (cherry picked from commit b17c88c) * Change version guard to 2.9.0 Signed-off-by: Andrew Ross <[email protected]> --------- Signed-off-by: Andrew Ross <[email protected]> Co-authored-by: Aman Khare <[email protected]>
…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 <[email protected]> * Add changelog and license Signed-off-by: Aman Khare <[email protected]> * Add javadoc and correct styling Signed-off-by: Aman Khare <[email protected]> * Add new handler for sending compressed cluster state in validate join flow and refactor code Signed-off-by: Aman Khare <[email protected]> * Refactor util method Signed-off-by: Aman Khare <[email protected]> * optimize imports Signed-off-by: Aman Khare <[email protected]> * Use cluster state version based cache instead of time based cache Signed-off-by: Aman Khare <[email protected]> * style fix Signed-off-by: Aman Khare <[email protected]> * fix styling 2 Signed-off-by: Aman Khare <[email protected]> * Use concurrent hashmap instead of cache, add UT class for ClusterStateUtils Signed-off-by: Aman Khare <[email protected]> * style fix Signed-off-by: Aman Khare <[email protected]> * Use AtomicReference instead of ConcurrentHashMap Signed-off-by: Aman Khare <[email protected]> * Use method overloading to simplify the caller code Signed-off-by: Aman Khare <[email protected]> * Resolve conflicts Signed-off-by: Aman Khare <[email protected]> * Change code structure to separate the flow for JoinHelper and PublicationTransportHelper Signed-off-by: Aman Khare <[email protected]> * Remove unnecessary input.setVersion line Co-authored-by: Andrew Ross <[email protected]> Signed-off-by: Aman Khare <[email protected]> --------- Signed-off-by: Aman Khare <[email protected]> Signed-off-by: Aman Khare <[email protected]> Co-authored-by: Aman Khare <[email protected]> Co-authored-by: Andrew Ross <[email protected]> (cherry picked from commit b17c88c) * Change version guard to 2.9.0 Signed-off-by: Andrew Ross <[email protected]> --------- Signed-off-by: Andrew Ross <[email protected]> Co-authored-by: Aman Khare <[email protected]>
…1.0.83 (opensearch-project#7933) * Update network schema Signed-off-by: Stephen Crawford <[email protected]> * Update CHANGELOG.md Signed-off-by: Stephen Crawford <[email protected]> * Update CHANGELOG.md Signed-off-by: Stephen Crawford <[email protected]> * Add joni and jcoding to path Signed-off-by: Stephen Crawford <[email protected]> * Update buildSrc/src/main/java/org/opensearch/gradle/precommit/ValidateJsonAgainstSchemaTask.java Signed-off-by: Stephen Crawford <[email protected]> * Update buildSrc/src/main/java/org/opensearch/gradle/precommit/ValidateJsonAgainstSchemaTask.java Signed-off-by: Stephen Crawford <[email protected]> * Update buildSrc/src/main/java/org/opensearch/gradle/precommit/ValidateJsonAgainstSchemaTask.java Signed-off-by: Stephen Crawford <[email protected]> * Update rest-api-spec/src/main/resources/rest-api-spec/api/bulk.json Signed-off-by: Stephen Crawford <[email protected]> * Update rest-api-spec/src/main/resources/rest-api-spec/api/bulk.json Signed-off-by: Stephen Crawford <[email protected]> * Update Apache Lucene to 9.7.0-snapshot-204acc3 (opensearch-project#7887) Signed-off-by: Andriy Redko <[email protected]> * Add bwc version 2.8.1 (opensearch-project#7942) Signed-off-by: Andriy Redko <[email protected]> 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 <[email protected]> * 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 <[email protected]> * Fix Gradle check Signed-off-by: Ankit Kala <[email protected]> * Retrying Gradle check Signed-off-by: Ankit Kala <[email protected]> --------- Signed-off-by: Ankit Kala <[email protected]> * rebase Signed-off-by: Stephen Crawford <[email protected]> * remove empty line Signed-off-by: Stephen Crawford <[email protected]> * Update CHANGELOG.md Signed-off-by: Stephen Crawford <[email protected]> --------- Signed-off-by: Stephen Crawford <[email protected]> Signed-off-by: Stephen Crawford <[email protected]> Signed-off-by: Andriy Redko <[email protected]> Signed-off-by: Andrew Ross <[email protected]> Signed-off-by: Ankit Kala <[email protected]> Co-authored-by: Andriy Redko <[email protected]> Co-authored-by: opensearch-trigger-bot[bot] <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Co-authored-by: Andrew Ross <[email protected]> Co-authored-by: Ankit Kala <[email protected]> Signed-off-by: Rishab Nahata <[email protected]>
…arch-project#7321) * Compress and cache cluster state during validate join request Signed-off-by: Aman Khare <[email protected]> * Add changelog and license Signed-off-by: Aman Khare <[email protected]> * Add javadoc and correct styling Signed-off-by: Aman Khare <[email protected]> * Add new handler for sending compressed cluster state in validate join flow and refactor code Signed-off-by: Aman Khare <[email protected]> * Refactor util method Signed-off-by: Aman Khare <[email protected]> * optimize imports Signed-off-by: Aman Khare <[email protected]> * Use cluster state version based cache instead of time based cache Signed-off-by: Aman Khare <[email protected]> * style fix Signed-off-by: Aman Khare <[email protected]> * fix styling 2 Signed-off-by: Aman Khare <[email protected]> * Use concurrent hashmap instead of cache, add UT class for ClusterStateUtils Signed-off-by: Aman Khare <[email protected]> * style fix Signed-off-by: Aman Khare <[email protected]> * Use AtomicReference instead of ConcurrentHashMap Signed-off-by: Aman Khare <[email protected]> * Use method overloading to simplify the caller code Signed-off-by: Aman Khare <[email protected]> * Resolve conflicts Signed-off-by: Aman Khare <[email protected]> * Change code structure to separate the flow for JoinHelper and PublicationTransportHelper Signed-off-by: Aman Khare <[email protected]> * Remove unnecessary input.setVersion line Co-authored-by: Andrew Ross <[email protected]> Signed-off-by: Aman Khare <[email protected]> --------- Signed-off-by: Aman Khare <[email protected]> Signed-off-by: Aman Khare <[email protected]> Co-authored-by: Aman Khare <[email protected]> Co-authored-by: Andrew Ross <[email protected]> Signed-off-by: Shivansh Arora <[email protected]>
Move entry for opensearch-project#7321 to correct section and fix the malformed entry from opensearch-project#7452. Signed-off-by: Andrew Ross <[email protected]> Signed-off-by: Shivansh Arora <[email protected]>
…1.0.83 (opensearch-project#7933) * Update network schema Signed-off-by: Stephen Crawford <[email protected]> * Update CHANGELOG.md Signed-off-by: Stephen Crawford <[email protected]> * Update CHANGELOG.md Signed-off-by: Stephen Crawford <[email protected]> * Add joni and jcoding to path Signed-off-by: Stephen Crawford <[email protected]> * Update buildSrc/src/main/java/org/opensearch/gradle/precommit/ValidateJsonAgainstSchemaTask.java Signed-off-by: Stephen Crawford <[email protected]> * Update buildSrc/src/main/java/org/opensearch/gradle/precommit/ValidateJsonAgainstSchemaTask.java Signed-off-by: Stephen Crawford <[email protected]> * Update buildSrc/src/main/java/org/opensearch/gradle/precommit/ValidateJsonAgainstSchemaTask.java Signed-off-by: Stephen Crawford <[email protected]> * Update rest-api-spec/src/main/resources/rest-api-spec/api/bulk.json Signed-off-by: Stephen Crawford <[email protected]> * Update rest-api-spec/src/main/resources/rest-api-spec/api/bulk.json Signed-off-by: Stephen Crawford <[email protected]> * Update Apache Lucene to 9.7.0-snapshot-204acc3 (opensearch-project#7887) Signed-off-by: Andriy Redko <[email protected]> * Add bwc version 2.8.1 (opensearch-project#7942) Signed-off-by: Andriy Redko <[email protected]> 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 <[email protected]> * 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 <[email protected]> * Fix Gradle check Signed-off-by: Ankit Kala <[email protected]> * Retrying Gradle check Signed-off-by: Ankit Kala <[email protected]> --------- Signed-off-by: Ankit Kala <[email protected]> * rebase Signed-off-by: Stephen Crawford <[email protected]> * remove empty line Signed-off-by: Stephen Crawford <[email protected]> * Update CHANGELOG.md Signed-off-by: Stephen Crawford <[email protected]> --------- Signed-off-by: Stephen Crawford <[email protected]> Signed-off-by: Stephen Crawford <[email protected]> Signed-off-by: Andriy Redko <[email protected]> Signed-off-by: Andrew Ross <[email protected]> Signed-off-by: Ankit Kala <[email protected]> Co-authored-by: Andriy Redko <[email protected]> Co-authored-by: opensearch-trigger-bot[bot] <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Co-authored-by: Andrew Ross <[email protected]> Co-authored-by: Ankit Kala <[email protected]> Signed-off-by: Shivansh Arora <[email protected]>
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.