linkedin / ambry

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

Add sanity check for blob id in blob store #2930

Closed justinlin-linkedin closed 3 weeks ago

justinlin-linkedin commented 3 weeks ago

Summary

Add sanity check in blobstore put method to make sure the blob id belongs to the partition of this blob store.

Test

Added a unit test case.

codecov-commenter commented 3 weeks ago

Codecov Report

Attention: Patch coverage is 88.88889% with 4 lines in your changes missing coverage. Please review.

Project coverage is 70.22%. Comparing base (52ba813) to head (9fa626f). Report is 131 commits behind head on master.

Files with missing lines Patch % Lines
...rc/main/java/com/github/ambry/store/BlobStore.java 91.42% 1 Missing and 2 partials :warning:
...va/com/github/ambry/replication/ReplicaThread.java 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2930 +/- ## ============================================ + Coverage 64.24% 70.22% +5.98% - Complexity 10398 11965 +1567 ============================================ Files 840 865 +25 Lines 71755 73631 +1876 Branches 8611 8856 +245 ============================================ + Hits 46099 51709 +5610 + Misses 23004 19225 -3779 - Partials 2652 2697 +45 ```

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