From 09a013fbad19575b22709c872b88a18634ca624a Mon Sep 17 00:00:00 2001 From: Igor Putovny Date: Tue, 12 Mar 2024 16:33:23 +0100 Subject: [PATCH] Add small check to the first pass of ORTC algorithm --- proto/aggregator/aggregator.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/proto/aggregator/aggregator.c b/proto/aggregator/aggregator.c index 1c80e6f2d..a1889588c 100644 --- a/proto/aggregator/aggregator.c +++ b/proto/aggregator/aggregator.c @@ -236,6 +236,12 @@ first_pass(struct trie_node *node, slab *trie_slab) if (is_leaf(node)) { + for (int i = 0; i < node->potential_buckets_count; i++) + { + if (node->potential_buckets[i] == node->bucket) + return; + } + node->potential_buckets[node->potential_buckets_count++] = node->bucket; return; } -- 2.47.2