-
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
Add node id to segment and translog metadata #10229
Conversation
Gradle Check (Jenkins) Run Completed with:
|
0b971ce
to
e1ff550
Compare
Compatibility status:Checks if related components are compatible with change 43fbb5d Incompatible componentsSkipped componentsCompatible componentsCompatible components: [https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/reporting.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/custom-codecs.git, https://github.com/opensearch-project/performance-analyzer.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git, https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/neural-search.git] |
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Codecov Report
@@ Coverage Diff @@
## main #10229 +/- ##
============================================
- Coverage 71.15% 71.09% -0.07%
+ Complexity 58247 58239 -8
============================================
Files 4831 4831
Lines 274684 274736 +52
Branches 40026 40034 +8
============================================
- Hits 195443 195312 -131
- Misses 62884 63085 +201
+ Partials 16357 16339 -18
|
Signed-off-by: Gaurav Bafna <gbbafna@amazon.com>
Signed-off-by: Gaurav Bafna <gbbafna@amazon.com>
Signed-off-by: Gaurav Bafna <gbbafna@amazon.com>
Signed-off-by: Gaurav Bafna <gbbafna@amazon.com>
Signed-off-by: Gaurav Bafna <gbbafna@amazon.com>
Signed-off-by: Gaurav Bafna <gbbafna@amazon.com>
Signed-off-by: Gaurav Bafna <gbbafna@amazon.com>
Signed-off-by: Gaurav Bafna <gbbafna@amazon.com>
Signed-off-by: Gaurav Bafna <gbbafna@amazon.com>
Gradle Check (Jenkins) Run Completed with:
|
Signed-off-by: Gaurav Bafna <gbbafna@amazon.com>
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
* Adding node id to segment and translog metadata Adding validation to identify multiple writers to same primary term and generation in remote store Signed-off-by: Gaurav Bafna <gbbafna@amazon.com> * Fix bug to find node id Signed-off-by: Gaurav Bafna <gbbafna@amazon.com> * Spotless fix Signed-off-by: Gaurav Bafna <gbbafna@amazon.com> * Moving node id before uuid as it was interfering with _ character split Signed-off-by: Gaurav Bafna <gbbafna@amazon.com> * Removing uuid from segment metadata file Signed-off-by: Gaurav Bafna <gbbafna@amazon.com> * simplifying the detection logic Signed-off-by: Gaurav Bafna <gbbafna@amazon.com> * PR comments Signed-off-by: Gaurav Bafna <gbbafna@amazon.com> * Addressing PR comments Signed-off-by: Gaurav Bafna <gbbafna@amazon.com> * Adding translog gen to remote segment metadata fn as well Signed-off-by: Gaurav Bafna <gbbafna@amazon.com> * spotless fix Signed-off-by: Gaurav Bafna <gbbafna@amazon.com> * reducing METADATA_FILES_TO_FETCH to 10 Signed-off-by: Gaurav Bafna <gbbafna@amazon.com> * adding missing import Signed-off-by: Gaurav Bafna <gbbafna@amazon.com> --------- Signed-off-by: Gaurav Bafna <gbbafna@amazon.com> (cherry picked from commit 7159e2e) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
throw new IllegalStateException( | ||
"Multiple metadata files from different nodes" | ||
+ nodeIdByPrimaryTermAndGen.v1() | ||
+ " and " | ||
+ nodeIdByPrimaryTermAndGen.v2() | ||
+ "having same primary term and generations detected" | ||
); |
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 for adding more details
--------- (cherry picked from commit 7159e2e) Signed-off-by: Gaurav Bafna <gbbafna@amazon.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Adding node id to segment and translog metadata Adding validation to identify multiple writers to same primary term and generation in remote store Signed-off-by: Gaurav Bafna <gbbafna@amazon.com> * Fix bug to find node id Signed-off-by: Gaurav Bafna <gbbafna@amazon.com> * Spotless fix Signed-off-by: Gaurav Bafna <gbbafna@amazon.com> * Moving node id before uuid as it was interfering with _ character split Signed-off-by: Gaurav Bafna <gbbafna@amazon.com> * Removing uuid from segment metadata file Signed-off-by: Gaurav Bafna <gbbafna@amazon.com> * simplifying the detection logic Signed-off-by: Gaurav Bafna <gbbafna@amazon.com> * PR comments Signed-off-by: Gaurav Bafna <gbbafna@amazon.com> * Addressing PR comments Signed-off-by: Gaurav Bafna <gbbafna@amazon.com> * Adding translog gen to remote segment metadata fn as well Signed-off-by: Gaurav Bafna <gbbafna@amazon.com> * spotless fix Signed-off-by: Gaurav Bafna <gbbafna@amazon.com> * reducing METADATA_FILES_TO_FETCH to 10 Signed-off-by: Gaurav Bafna <gbbafna@amazon.com> * adding missing import Signed-off-by: Gaurav Bafna <gbbafna@amazon.com> --------- Signed-off-by: Gaurav Bafna <gbbafna@amazon.com>
* Adding node id to segment and translog metadata Adding validation to identify multiple writers to same primary term and generation in remote store Signed-off-by: Gaurav Bafna <gbbafna@amazon.com> * Fix bug to find node id Signed-off-by: Gaurav Bafna <gbbafna@amazon.com> * Spotless fix Signed-off-by: Gaurav Bafna <gbbafna@amazon.com> * Moving node id before uuid as it was interfering with _ character split Signed-off-by: Gaurav Bafna <gbbafna@amazon.com> * Removing uuid from segment metadata file Signed-off-by: Gaurav Bafna <gbbafna@amazon.com> * simplifying the detection logic Signed-off-by: Gaurav Bafna <gbbafna@amazon.com> * PR comments Signed-off-by: Gaurav Bafna <gbbafna@amazon.com> * Addressing PR comments Signed-off-by: Gaurav Bafna <gbbafna@amazon.com> * Adding translog gen to remote segment metadata fn as well Signed-off-by: Gaurav Bafna <gbbafna@amazon.com> * spotless fix Signed-off-by: Gaurav Bafna <gbbafna@amazon.com> * reducing METADATA_FILES_TO_FETCH to 10 Signed-off-by: Gaurav Bafna <gbbafna@amazon.com> * adding missing import Signed-off-by: Gaurav Bafna <gbbafna@amazon.com> --------- Signed-off-by: Gaurav Bafna <gbbafna@amazon.com>
* Adding node id to segment and translog metadata Adding validation to identify multiple writers to same primary term and generation in remote store Signed-off-by: Gaurav Bafna <gbbafna@amazon.com> * Fix bug to find node id Signed-off-by: Gaurav Bafna <gbbafna@amazon.com> * Spotless fix Signed-off-by: Gaurav Bafna <gbbafna@amazon.com> * Moving node id before uuid as it was interfering with _ character split Signed-off-by: Gaurav Bafna <gbbafna@amazon.com> * Removing uuid from segment metadata file Signed-off-by: Gaurav Bafna <gbbafna@amazon.com> * simplifying the detection logic Signed-off-by: Gaurav Bafna <gbbafna@amazon.com> * PR comments Signed-off-by: Gaurav Bafna <gbbafna@amazon.com> * Addressing PR comments Signed-off-by: Gaurav Bafna <gbbafna@amazon.com> * Adding translog gen to remote segment metadata fn as well Signed-off-by: Gaurav Bafna <gbbafna@amazon.com> * spotless fix Signed-off-by: Gaurav Bafna <gbbafna@amazon.com> * reducing METADATA_FILES_TO_FETCH to 10 Signed-off-by: Gaurav Bafna <gbbafna@amazon.com> * adding missing import Signed-off-by: Gaurav Bafna <gbbafna@amazon.com> --------- Signed-off-by: Gaurav Bafna <gbbafna@amazon.com> Signed-off-by: Shivansh Arora <hishiv@amazon.com>
Adding validation to identify multiple writers to same primary term and generation in remote store
Description
Adding node id to remote segment and translog metadata files . This is to identify if we have concurrent writers to same file , causing consistency issues.
Related Issues
Resolves #[Issue number to be closed when this PR is merged]
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.