After restore from backup it is not uncommon for some database references to point at files that no longer exist in blob storage. When an attempt is made to download these files it results in a 500 error response.
In the case of maven-metadata.xml files we can do better. We already rebuild these files during GET requests as needed when they are marked as dirty. We should also consider rebuilding them when their blob references cannot be resolved.
- If a maven-metadata.xml file or its associated checksum files is no longer present on disk treat the maven-metadata.xml file as dirty, and rebuild it.
- If a maven-metadata.xml file or its associated checksum files is in soft deleted state, undelete it and keep going as normal