Transactional locks for sync completions #2219

Merged
zachgoll merged 2 commits from zachgoll/fix-family-sync-race-condition into main 2025-05-08 04:28:58 +08:00
zachgoll commented 2025-05-08 04:20:25 +08:00 (Migrated from github.com)

Users have complained about syncs getting "stuck", which many have been caused by the Family sync, which delegates to its child syncs to alert it when they have all completed.

Given the concurrent nature of sync operations, in some cases, multiple child syncs were alerting the parent of completion at the same time. Without DB locks, this occasionally resulted in an "infinite sync" scenario where the parent never completed.

Users have complained about syncs getting "stuck", which many have been caused by the `Family` sync, which delegates to its child syncs to alert it when they have all completed. Given the concurrent nature of sync operations, in some cases, multiple child syncs were alerting the parent of completion at the same time. Without DB locks, this occasionally resulted in an "infinite sync" scenario where the parent never completed.
Sign in to join this conversation.