Commit 2ddca956 authored by Tobias Koppers's avatar Tobias Koppers Committed by Luke Sandberg

Fix concurrency in aggregation update inner/follower classification

Add retry loop to inner_of_upper_has_new_follower and its batched
variants to correctly handle concurrent aggregation number changes.
Previously, the follower's aggregation number was read without holding
a lock, and the inner-vs-follower decision could be incorrect if it
changed concurrently. The new loop re-verifies the classification
under the correct lock.

Also adds proper ctx.should_track_activeness() guards, moves
per-iteration state inside the loop in inner_of_upper_has_new_followers,
removes unnecessary BalanceEdge for inner nodes (now handled by the
retry loop), and fixes the optimize check to use added_uppers instead
of persistent_uppers.
parent 135224c6
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment