Comment 8 for bug 493703

Revision history for this message
Michael Nelson (michael.nelson) wrote :

So, given that dapper is a long-term-service and not yet obsoleted (security on the server for 5 years), we're still not sure why but the current theory is that the data had been corrupt for a long time (with LFC.deleted == True), but it was only with the recent patch-2207-15-0.sql that the LFA.content was set to None (with the LFC.deleted column being dropped in the same patch).

According to the column comment (for LFC.deleted, which no longer exists):

COMMENT ON COLUMN LibraryFileContent.deleted IS 'This file has been removed from disk by the librarian garbage collector.'

It would suggest that the binaries themselves were already removed from disk, but the lfc was still around with deleted=True? Now that it has been deleted by the db patch, there is nothing in the librariangc to deal with an lfa without content (it removes lfas that are unreferenced in the DB, or LFCs that aren't referenced by any LFAs).

As it turns out, there are *lots* of LFAs with null content currently in the DB (over 1 million)? We would need to look at a backup of the DB to see if all those LFAs did in fact have LFC.deleted==True.

But back to this actual bug, I'll ensure that we do not present lfas for a build's binary packages that have been deleted (ie. have no content).