question: public static boolean isFullyActive ( Set < String > liveNodes , DocCollection collectionState , int expectedShards , int expectedReplicas ) { Objects . requireNonNull ( liveNodes ) ; if ( collectionState == null ) return false ; int activeShards = 0 ; for ( Slice slice : collectionState ) { int activeReplicas = 0 ; for ( Replica replica : slice ) { if ( replica . isActive ( liveNodes ) == false ) return false ; activeReplicas ++ ; } if ( activeReplicas != expectedReplicas ) return false ; activeShards ++ ; } return activeShards == expectedShards ; }
target:  Check that all replicas in a collection are live