next.js
2ddca956 - Fix concurrency in aggregation update inner/follower classification

Commit
5 days ago
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.
Author
Committer
Parents
Loading