Downgrade by store atime even when store doc is missing
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Dmedia |
Fix Released
|
Critical
|
Jason Gerard DeRose |
Bug Description
Each FileStore (drive) has an associated doc in CouchDB. This `doc.atime` is the last time a reality check was done on the drive, meaning the drive was connected and a scan + relink was done to make sure the metadata in CouchDB reflects the current reality on the drive, adjusting as necessary.
When a drive has gone more than a certain amount of time without a reality check (currently one week), the confidence in those copies is automatically downgraded. MetaStore.
Currently we downgrade using a view that sorts all stores by their atime. But we should likewise downgrade copies even if a FileStore lacks a corresponding doc in CouchDB. Actually, we should especially downgrade them in this case, because this is a symptom that something is amiss.
So this should be changed to use the file/stored view instead, so we drive the behavior based the stores in which there are files, based on metadata about the files rather than metadata about the drives.
Related branches
- xzcvczx (community): Approve
- dmedia Dev: Pending requested
-
Diff: 256 lines (+143/-57)2 files modifieddmedia/metastore.py (+26/-14)
dmedia/tests/test_metastore.py (+117/-43)
Changed in dmedia: | |
status: | In Progress → Fix Committed |
Changed in dmedia: | |
importance: | High → Critical |
Changed in dmedia: | |
status: | Fix Committed → Fix Released |