max = cluster.getLiveParticipantMap().size();
} else if ("R".equals(numInstancesPerState)) {
// idealState is null when resource has been dropped,
// R can't be evaluated and ignore state constraints
if (context != null) {
if (context.anyLiveParticipant()) {
max = cluster.getLiveParticipantMap().size();
} else {
max = context.getReplicaCount();
}
}