From aa611e48e02f8e9cc3215a42d7e68ff1a67a5bc0 Mon Sep 17 00:00:00 2001 From: Igor Putovny Date: Fri, 6 Oct 2023 14:38:07 +0200 Subject: [PATCH] Assign bucket of ancestor node to leaf node --- proto/aggregator/aggregator.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/proto/aggregator/aggregator.c b/proto/aggregator/aggregator.c index d8f168515..aeca20192 100644 --- a/proto/aggregator/aggregator.c +++ b/proto/aggregator/aggregator.c @@ -182,7 +182,7 @@ get_ancestor_bucket(const struct trie_node *node) while (1) { if (node->parent == NULL) - return NULL; + return node->bucket; if (node->parent->bucket != NULL) return node->parent->bucket; @@ -204,6 +204,7 @@ first_pass(struct trie_node *node, slab *trie_slab) if (is_leaf(node)) { node->potential_buckets[node->potential_buckets_count++] = get_ancestor_bucket(node); + //node->potential_buckets[node->potential_buckets_count++] = node->bucket; return; } -- 2.47.2