-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Fix node bootstrap error when enable stream transport and remote cluster state #19948
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
Fix node bootstrap error when enable stream transport and remote cluster state #19948
Conversation
|
❌ Gradle check result for 566d7f6: 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? |
b64bdc7 to
68fb9d8
Compare
|
❌ Gradle check result for 68fb9d8: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #19948 +/- ##
============================================
+ Coverage 73.25% 73.32% +0.06%
- Complexity 71615 71634 +19
============================================
Files 5789 5790 +1
Lines 327471 327549 +78
Branches 47168 47181 +13
============================================
+ Hits 239905 240160 +255
+ Misses 68315 68117 -198
- Partials 19251 19272 +21 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
a7986d3 to
0f95d1c
Compare
|
❌ Gradle check result for 0f95d1c: null 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? |
…ransport Signed-off-by: bowenlan-amzn <[email protected]>
Signed-off-by: bowenlan-amzn <[email protected]>
Signed-off-by: bowenlan-amzn <[email protected]>
Signed-off-by: bowenlan-amzn <[email protected]>
0f95d1c to
3e1a00d
Compare
|
❌ Gradle check result for 3e1a00d: 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? |
Signed-off-by: bowenlan-amzn <[email protected]>
…ter state (opensearch-project#19948) Signed-off-by: bowenlan-amzn <[email protected]>
Description
This PR fixes a bootstrap failure that occurs when streaming transport is used with remote cluster state. Without this fix, nodes fail to start with the error:
Root Cause
When streaming transport is enabled, the node bootstrap process creates two separate
LocalNodeFactoryinstances:TransportServiceStreamTransportServiceDuring node startup, both transport services are started sequentially:
Both services inherit
TransportService.doStart()which calls:Each call to
LocalNodeFactory.apply()triggers:DiscoveryNodecreationremoteStoreNodeService.createAndVerifyRepositories()Since both factories attempt to register the same repositories (configured via node attributes), the second call fails with "can't overwrite as repositories are already present".
Solution
We don't do Remote store repository creation and verification when it's for stream transport
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.