Repository navigation
SOLR-17820: Fix CLUSTERSTATUS health reporting GREEN with down replicas - #5046
Merged
Merged
Conversation
… a replica on a dead node health was computed from docCollection before crossCheckReplicaStateWithLiveNodes corrected replicas whose state.json entry was still "active" despite their node being dead - so a shard could report health=GREEN while the same response showed one of its replicas as "down". Moved the cross-check to run before health is computed, and added a unit test reproducing the dead-node scenario directly.
Contributor
Author
|
I also testing this by hand.... |
sigram
approved these changes
Oct 8, 2026
| import org.junit.Test; | ||
|
|
||
| /** Tests that cluster health reflects replica states corrected against live nodes. */ | ||
| public class ClusterStatusTest extends SolrTestCaseJ4 { |
Contributor
Author
There was a problem hiding this comment.
thank you! I also updated our Agents.md with a stronger phraseing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
healthwas computed fromdocCollectionbeforecrossCheckReplicaStateWithLiveNodescorrected replicas whosestate.jsonentry was still"active"despite their node actually being dead - so a shard could reporthealth=GREENwhile the very same response showed one of its replicas as"down".ClusterStatusTestreproducing the dead-node scenario directly againstcrossCheckReplicaStateWithLiveNodes+postProcessCollectionJSON, assertingORANGE(notGREEN) once one of two replicas is down.Test plan
ClusterStatusTest#testHealthReflectsReplicaOnDeadNodepasses, and fails withexpected:<ORANGE> but was:<GREEN>if the call order is reverted.https://issues.apache.org/jira/browse/SOLR-17820