SQLIndex: report blobs marked deleted as missing
Before raising this MR, consider whether the following are required, and complete if so:
-
Unit tests -
Metrics -
Documentation update(s)
Description
Before this MR, SQLIndex
reports blobs marked deleted as existing. This is a data race if a client calls FMB, believes a blob exists, but the blob is later deleted by the cleaner.
This short MR changes the behavior to report such blobs as missing, so the clients are required to re-upload the blob.
I don't think this fix will solve all data races. It's possible that the following sequence of events can happen:
- A blob is marked as deleted
- Cleaner collects rows marked as deleted, initiating deletes in the underlying storage
- Client calls FMB and finds the blob missing
- Client puts the blob
- The delete in the underlying storage is handled
In this case, the blob cannot be found when the client uses it, though it might be less confusing than reporting deleted blobs as existing.
Edited by Zehao Chen