linkedin / ambry

Distributed object store
https://github.com/linkedin/ambry/wiki
Apache License 2.0
1.74k stars 275 forks source link

Server returns Blob_Deleted for deleted blob out of retention #2821

Closed justinlin-linkedin closed 1 month ago

justinlin-linkedin commented 1 month ago

Summary

When issuing a get request with include_deleted get option, frontend would send a get request to server to fetch the content of the blob. However, if any chunk blob is deleted and out of retention window, even if we have metadata chunk still in the server, we can't finish downloading the entire blob.

This PR fixes this issue by not returning content for metadata. Now if client issues a get request with include_deleted get option and trying to download a blob that was already deleted and out of retention window, server would just return ID_Deleted error back to frontend so frontend would just return 410 back to client right away.

To download deleted and out of retention blobs, we can issue a get request with include_all.

Details

Add a new StoreGetOptions Store_Include_Compaction_Ready

Change the meaning of Store_Include_Deleted

Test

Unit test

codecov-commenter commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 70.21%. Comparing base (52ba813) to head (6ef975a). Report is 41 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2821 +/- ## ============================================ + Coverage 64.24% 70.21% +5.96% - Complexity 10398 11756 +1358 ============================================ Files 840 842 +2 Lines 71755 72362 +607 Branches 8611 8709 +98 ============================================ + Hits 46099 50806 +4707 + Misses 23004 18896 -4108 - Partials 2652 2660 +8 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.