Also replacing
```
if (!replicas.toSet.subsetOf(availableBrokerIds))
throw new BrokerNotAvailableException(
s"Some brokers specified for partition id $partitionId are not
available. " +
s"Specified brokers: ${replicas.mkString(", ")}, " +
s"available brokers: ${availableBrokerIds.mkString(", ")}.")
```
with
```
if ((replicas.toSet -- availableBrokerIds).size == replicas.size)
throw new BrokerNotAvailableException(
s"All brokers specified for partition id $partitionId are not
available. " +
s"Specified brokers: ${replicas.mkString(", ")}, " +
s"available brokers: ${availableBrokerIds.mkString(", ")}.")
```
makes sense.
Throw error only if any partition has all unavailable replicas. With one
available replica also, topic creation should happen. When those unavailable
brokers come up, then they act as the replica.
[ Full content available at: https://github.com/apache/kafka/pull/5665 ]
This message was relayed via gitbox.apache.org for [email protected]