epugh opened a new pull request, #5046: URL: https://github.com/apache/solr/pull/5046
## Summary - `health` was computed from `docCollection` *before* `crossCheckReplicaStateWithLiveNodes` corrected replicas whose `state.json` entry was still `"active"` despite their node actually being dead - so a shard could report `health=GREEN` while the very same response showed one of its replicas as `"down"`. - Moved the cross-check to run before health is computed, so health reflects the same (corrected) replica states shown elsewhere in the response. - Added `ClusterStatusTest` reproducing the dead-node scenario directly against `crossCheckReplicaStateWithLiveNodes` + `postProcessCollectionJSON`, asserting `ORANGE` (not `GREEN`) once one of two replicas is down. ## Test plan - [x] New unit test `ClusterStatusTest#testHealthReflectsReplicaOnDeadNode` passes, and fails with `expected:<ORANGE> but was:<GREEN>` if the call order is reverted. - [x] Reproduced manually against a live 3-node cluster: killing a node showed the affected shard/collection health flip from GREEN to the correct degraded color. https://issues.apache.org/jira/browse/SOLR-17820 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
