{"version":"2.1.227","anchor":"sync-work-per-turn-is-capped-by-time-path-count-row-count-an","canonical_anchor":"sync-work-per-turn-is-capped-by-time-path-count-row-count-an","heading":"Sync work per turn is capped by time, path count, row count and file size","tier":"notice","area":"Remote Sync","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.227\/e\/sync-work-per-turn-is-capped-by-time-path-count-row-count-an","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.227","markdown":"### Sync work per turn is capped by time, path count, row count and file size\n\nPer-turn syncing is capped by time, path count and a 64 MiB file size limit.\n\n**What**\n\nThe syncer enforces published limits so a turn cannot be delayed indefinitely by file transfer. The pre-turn pull is bounded by `WORKER_SYNC_BEFORE_TURN_CAP_MS` at 10000 ms, dropping to `WORKER_SYNC_DEGRADED_CAP_MS` at 500 ms once the connection is degraded. Pushing looks at 4096 candidate paths per turn at most and refuses any file over 64 MiB, so very large files never sync.\n\n**Details**\n\n- Surplus paths beyond 4096 rotate across later turns rather than being dropped.\n- At most 40 new entries are admitted per turn against a 256-entry cap, with some of that cap held in reserve.\n- The published record of worker state is capped at 2 MiB, with at most 256 recorded entries and 256 recorded skips.\n- If a previous worker process still holds the sync, the apply step retries up to `MAX_APPLY_ATTEMPTS` (3) times with `APPLY_RESTART_DELAY_MS` (5000 ms) between attempts.\n\n**Evidence**\n\n`WORKER_SYNC_BEFORE_TURN_CAP_MS`\n\n- Area: Remote Sync\n- Tier: You'll notice\n- Useful: 3\/5\n- Signal: 2\/5"}