wei liu ac23beefb5
fix: ensure all channels synced before updating current target (#46348)
issue: #46087, #46327

The previous implementation only checked if there were any ready
delegators before updating the current target. This could lead to
partial target updates when only some channels had ready delegators.

This regression was introduced by #46088, which removed the check for
all channels being ready. This fix ensures that
shouldUpdateCurrentTarget returns true only when ALL channels have been
successfully synced, preventing incomplete target updates that could
cause query inconsistencies.

Added unit tests to cover:
- All channels synced scenario (should return true)
- Partial channels synced scenario (should return false)
- No ready delegators scenario (should return false)

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2025-12-16 14:45:17 +08:00
..
2023-01-10 16:15:37 +08:00