-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix an issue of releasing lock for rq export job when the worker subp…
…rocess is killed (#8721) The main problem fixed by this PR is as follows: In the previous implementation, "long" locks were used when exporting a resource or deleting an export cache. If the export process was killed (e.g., by the OOM killer with 9 signal), the acquired lock was not released and remained active until the auto-release timeout expired (e.g., 4 hours). A subsequent user request to export a dataset could not acquire the lock, causing the job to be scheduled for execution after 60 seconds (default value). When the scheduled job ran again, it still could not acquire the lock, and the entire process was repeated. Additionally, if a user initiated the export process after the job was marked as scheduled, they were unable to re-initiate the process and received an error because the RQ job status was not set and handled correctly (it was remaining `STARTED`). One more found and fixed problem is that 2 users that have rights to export a resource could not make export in parallel (with the same options like format, save_images) and one of them received a `LockNotAvailableError` error. --------- Co-authored-by: Maxim Zhiltsov <[email protected]>
- Loading branch information
1 parent
c4504dc
commit a9ea512
Showing
11 changed files
with
609 additions
and
340 deletions.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
changelog.d/20241218_120228_maria_fix_export_job_lock_releasing.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
### Fixed | ||
|
||
- Exporting datasets could start significantly later than expected, both for 1 | ||
and several users in the same project/task/job (<https://github.com/cvat-ai/cvat/pull/8721>) | ||
- Scheduled RQ jobs could not be restarted due to incorrect RQ job status | ||
updating and handling (<https://github.com/cvat-ai/cvat/pull/8721>) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
635 changes: 400 additions & 235 deletions
635
cvat/apps/dataset_manager/tests/test_rest_api_formats.py
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.