redpanda icon indicating copy to clipboard operation
redpanda copied to clipboard

create topics: incorrect error code returned when replication factor is not correct

Open twmb opened this issue 4 years ago • 0 comments

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.

twmb avatar Jun 10 '21 23:06 twmb