ImportWorker should use Database.update() instead of Database.save()
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Dmedia |
Fix Committed
|
High
|
Jason Gerard DeRose |
Bug Description
microfiber.
microfiber.
Currently ImportWorker.
Turns out this can happen more often I would have guessed... when importing a large batch of files already in Dmedia. The problem is the window of time between (1) when a re-imported file is moved to its canonical location(s) and (2) when its metadata is updated. During this window the file mtime(s) on disk don't match the MetaData. So if the Dmedia service happens to scan the mtimes during the import and finds an mtime mismatch, it will downgrade that copy, creating the conflicting update. If you are importing to multiple destination drives at once, the chance of hitting this problem gets higher.
Switching ImportWorker.
Really this bugs shows that the Dmedia service is quickly and aggressively doing the right thing, so there is a bright side :)
Related branches
- David Jordan: Approve
-
Diff: 124 lines (+81/-5)3 files modifieddmedia/importer.py (+2/-5)
dmedia/metastore.py (+10/-0)
dmedia/tests/test_metastore.py (+69/-0)
Changed in dmedia: | |
status: | New → In Progress |
importance: | Undecided → High |
assignee: | nobody → Jason Gerard DeRose (jderose) |
summary: |
- ImporterWorker should use Database.update() instead of Database.save() + ImportWorker should use Database.update() instead of Database.save() |
Changed in dmedia: | |
status: | In Progress → Fix Committed |