An import's maps are one job that takes turns, so a batch no longer holds up the worker (#1077) #1085
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/1077-map-jobs-one-per-import"
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?
Closes #1077. Option 1 of the issue: no new service, queue, compose change, migration or bot change.
Summary
restore_imported_maps(campaign_id)walks the campaign's waiting maps in order, taking the map lock per map. Each map still flips to ready or failed as it is done.Three things beyond the issue
Bounds
Measured in a running stack
Own compose project on the dev host, worker at 1 GB with two slots. A real import of 30 maps of 4000×3000 (192 tiles each). The probe is a 10 ms read-only task sent during the batch.
Kill run: the pool process holding the lock was killed 6 s into the walk, during tile cutting. The task was received again 0.2 s later and all 30 maps ended ready in 41.64 s; the probes still completed in under 0.2 s.
Changelog
changelog.d/1077-map-jobs-one-per-import.fixed.mdTest plan
7420 passed, 14 skipped, 107 deselected.tests/export/test_map_jobs_one_per_import.py, 23 tests, with real file locks: one task per import; a held lock makes a task yield in under 3 s; kills during the check and during tile cutting; the sweep's three cases; both retry bounds.Known limit
On a media volume without
flock, one import's maps are still taken in turn, but an upload or a second import can decode alongside.docs/OPERATIONS.mdsays so.🤖 Generated with Claude Code