Downgrade by store atime even when store doc is missing

Bug #1131742 reported by Jason Gerard DeRose on 2013-02-22
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Dmedia
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.downgrade_by_store_atime() is the API call.

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

Changed in dmedia:
status: In Progress → Fix Committed
Changed in dmedia:
importance: High → Critical
Changed in dmedia:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers