Skip to content

Commit 79c4a18

Browse files
authored
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.
1 parent e462fc0 commit 79c4a18

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/server/cluster/cluster_config.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ bool HasValidNodeIds(const ClusterShardInfos& new_config) {
4040

4141
bool IsConfigValid(const ClusterShardInfos& new_config) {
4242
// Make sure that all slots are set exactly once.
43-
array<bool, cluster::kMaxSlotNum + 1> slots_found = {};
43+
vector<bool> slots_found(cluster::kMaxSlotNum + 1);
4444

4545
if (!HasValidNodeIds(new_config)) {
4646
return false;

0 commit comments

Comments
 (0)