fix: Stack overflow in DFLYCLUSTER CONFIG (#4342)

fix: Stack overflow in `DFLYCLUSTER CONFIG`

It's fine to use the heap in such cases, latency doesn't matter.
This commit is contained in:
Shahar Mike 2024-12-19 09:56:33 +02:00 committed by GitHub
parent e462fc0401
commit 79c4a1809b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -40,7 +40,7 @@ bool HasValidNodeIds(const ClusterShardInfos& new_config) {
bool IsConfigValid(const ClusterShardInfos& new_config) {
// Make sure that all slots are set exactly once.
array<bool, cluster::kMaxSlotNum + 1> slots_found = {};
vector<bool> slots_found(cluster::kMaxSlotNum + 1);
if (!HasValidNodeIds(new_config)) {
return false;