Rollover: scope checkBlock to write index only, skipping non-write alias members - #21838
Conversation
Signed-off-by: Mikhail Stepura <mstepura@apple.com>
PR Reviewer Guide 🔍(Review updated until commit 83fed8f)Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
|
❌ Gradle check result for bca10e0: 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: Mikhail Stepura <mstepura@apple.com>
|
Persistent review updated to latest commit 78dfd3e |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #21838 +/- ##
============================================
- Coverage 73.50% 73.48% -0.03%
+ Complexity 75572 75532 -40
============================================
Files 6034 6034
Lines 342604 342606 +2
Branches 49279 49281 +2
============================================
- Hits 251826 251751 -75
- Misses 70758 70862 +104
+ Partials 20020 19993 -27 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Persistent review updated to latest commit 27f18eb |
|
❌ Gradle check result for 27f18eb: 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? |
…changes) Build 78356 and 78421 failed. Verified no remaining references to deleted modules exist anywhere in the codebase. PR opensearch-project#21838 (unrelated) shows the same failure/pass/failure pattern in builds 78353/78354/78380, confirming this is systemic CI flakiness. Signed-off-by: Radhakrishnan Pachyappan <gingeekrishna@gmail.com>
|
Persistent review updated to latest commit 27f18eb |
|
❌ Gradle check result for 27f18eb: 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? |
|
Persistent review updated to latest commit 83fed8f |
|
@andrross it's been a month already. Are there anything wrong with these changes? |
Disclaimer: parts of this PR were generated by LLM
Description
The rollover precheck in
TransportRolloverAction.checkBlockresolved the rollover target to every alias member and aborted on anyMETADATA_WRITEblock on any of them. That means a non-write alias member carrying such a block — for example a cross-cluster-replication follower's index-replication block — kills otherwise-valid rollovers against a sibling write index. The same shape applies to data-stream rollovers when an older backing carries a metadata-write block.This PR scopes the precheck to the single write index via
IndexAbstraction.getWriteIndex()— the same pathMetadataRolloverServiceuses to perform the rollover — so the precheck and the actual rollover agree on which index matters. The same code path handles alias and data-stream targets and works regardless of which plugin placed the block.The block check itself still goes through
ClusterBlocks.indicesWithRemoteSnapshotBlockedException(added by #16483) — only the input changes from "all alias members" to "the single write index". The helper's existing carve-out forremote_snapshotindices (skip the abort unless the user has setindex.blocks.read_only,index.blocks.metadata, orindex.blocks.read_only_allow_delete) therefore continues to apply, so searchable-snapshot indices keep working.ClusterBlocks.indicesWithRemoteSnapshotBlockedExceptionitself is unchanged;TransportIndicesAliasesActionstill uses it for alias-modification blocking and is unaffected.Related Issues
Resolves #21629
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.