Sometimes I/O operations fail - that is just the nature of network storage.
However, we've seen a few cases recently where I/O has failed in new ways which has left corrupted media in our cache.
As an example, we found media in our cache that was 0 kB big because the network storage failed just as we were copying over the result.
We should make our media generation a little more robust:
if an exception occurs, make sure we clean up and partial files
if we find a media segment that is 0 bytes large, we should delete it (from a webserver thread if need be)
Sometimes I/O operations fail - that is just the nature of network storage.
However, we've seen a few cases recently where I/O has failed in new ways which has left corrupted media in our cache. As an example, we found media in our cache that was 0 kB big because the network storage failed just as we were copying over the result.
We should make our media generation a little more robust: