Skip to content

Commit

Permalink
fix: Stack overflow in DFLYCLUSTER CONFIG (#4342)
Browse files Browse the repository at this point in the history
fix: Stack overflow in `DFLYCLUSTER CONFIG`

It's fine to use the heap in such cases, latency doesn't matter.
  • Loading branch information
chakaz authored Dec 19, 2024
1 parent e462fc0 commit 79c4a18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server/cluster/cluster_config.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 79c4a18

Please sign in to comment.