redpanda
redpanda copied to clipboard
create topics: incorrect error code returned when replication factor is not correct
CreateTopics with an RF greater than the # of brokers returns the wrong error message,
I think because the RF passes validators, but then the partition_allocator does not allocate partitions (guessing here), so then the topic_frontend defaults to returning INVALID_PARTITIONS when it should in this case return INVALID_REPLICATION_FACTOR.
If the cluster size is 1, but create_topics uses RF of 3, RF will pass the positive && odd validations, but the request will fail.