Fix race condition causing syncing loaders to get stuck #2412
Reference in New Issue
Block a user
Delete Branch "zachgoll/maybe-881-occasionally-syncing-loaders-get-stuck-because-sync-status"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The sync status monitor was experiencing a race condition that caused syncing loaders to appear stuck even after syncs completed.
Root Cause
The issue occurred because:
handle_transitionwould updatefamily.latest_sync_activity_atSyncStatusMonitorSolution
Move the timestamp update to an
after_commitcallback. This ensures:This eliminates the race condition while maintaining all existing functionality that depends on these timestamps for cache invalidation.