Fatal error System.Exception: Detected non-empty blocksets with no associated blocks!

Well this is great. Yeah, if you could query the DB as before, then go back to the old logs and find hopefully the files around to those missing blocksetID’s, hopefully in a nice order, you should be able to infer exactly which files are the problem. this post suggests the same. That will be the first time we have been able to identify that.That would be progress.

Also, maybe you’ve identified a way to cause it at will.

backup with TEMP or CACHE.
add filter to exclude TEMP or CACHE.
get error.