turbo
adfb5990 - Graph aggregation refactoring (#8082)

Commit
1 year ago
Graph aggregation refactoring (#8082) ### Description * Deletes the aggregation tree * Adds a new graph aggregation algorithm which is more efficient The graph aggregation works as following: For the graph aggregation: Every task is a node in the graph. Every parent-child relationship is an edge in the graph. * Every node has an "aggregation number" N. * There are 2 kinds of nodes: Leaf nodes and aggregating nodes. * If a node has N < LEAF_NUMBER, it's a leaf node, otherwise an aggregating node. * A higher N for a node usually means that a larger subgraph is aggregated into that node. * Next to normal edges there are two extra kind of edges for the graph aggregation: Upper edges and follower edges. * A node is considered as "inner" to another node when it has an "upper" edge pointing towards it. * The inner node has a lower N than the upper node. (This invariant might be temporarily violated while tree balancing is scheduled but not executed yet) * Aggregating nodes store an aggregated version of the state of all inner nodes and transitively inner nodes. * Changes in nodes are propagated to all upper nodes. * Every node has at least one upper node which is more aggregated than the node. Except for the root node of the graph, which doesn't have upper edges. * An aggregating node also has follower edges. They point to the nodes that are one normal edge after all inner and transitively inner nodes. * An leaf node doesn't have follower edges. For all purposes the normal edges of leaf nodes are considered as follower edges. * Follower nodes have a higher N than the origin node. (This invariant might be temporarily violated while tree balancing is scheduled but not executed yet) * This means large and larger subgraphs are aggregated. * Graph operations will ensure that these invariants (Higher N on upper and follower edges) are not violated. * The N of a node can only increase. So graph operations need to "fix" the invariants by increasing N or changing upper/follower edges. That later one is preferred. N is usually only increased if two nodes have equal N. * When new edges between leaf nodes are added, the target node's N is increased to the origin node's N + 4 if it's smaller. This adds a small tolerance range so increasing N doesn't cause long chains of N += 1 between leaf nodes. ### Testing Instructions <!-- Give a quick description of steps to test your changes. --> Closes PACK-3036 --------- Co-authored-by: Alexander Lyon <arlyon@me.com>
Author
Parents
Loading