redpanda-data / redpanda

Redpanda is a streaming data platform for developers. Kafka API compatible. 10x faster. No ZooKeeper. No JVM!
https://redpanda.com
9.65k stars 589 forks source link

[CORE-7750] PoC - Creating topic with huge number of partitions leads to segfault #24135

Open IoannisRP opened 1 day ago

IoannisRP commented 1 day ago

Fixes: CORE-7750

The size of the allocation_request created as part of the partition allocation scales linearly with the number of partitions needed to be created. Currently, the check to see if the request can be accepted happens on the allocation_request object. When the number of requested partitions is too big, we run out of memory while creating this object.

The fix is to be lazy on the creation of the allocation_request, where possible, and do the first step of the validation before we create the full object.

TODO:

Backports Required

Release Notes

Bug Fixes

IoannisRP commented 20 hours ago

@rockwotj good points. I'll address them and i'll add the do_create_partion lazy path.

michael-redpanda commented 19 hours ago

/dt