ambry
ambry copied to clipboard
Detect conflict during named blob put operation before upload or stitch operation.
If the upload or stitch operation of a named blob is done without x-ambry-named-upsert header set to true, then update to the named blob is not allowed, and Ambry should return http 409 Conflict error code.
When handling such requests, its efficient to first check for a conflict, and then do the work of saving the blob to storage node. This PR makes the change to first check for conflict, and do the upload only if there is no conflict.
Codecov Report
Attention: Patch coverage is 53.33333% with 28 lines in your changes are missing coverage. Please review.
Project coverage is 31.88%. Comparing base (
52ba813) to head (1d98605). Report is 3 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #2704 +/- ##
=============================================
- Coverage 64.24% 31.88% -32.37%
+ Complexity 10398 5348 -5050
=============================================
Files 840 840
Lines 71755 71822 +67
Branches 8611 8621 +10
=============================================
- Hits 46099 22898 -23201
- Misses 23004 47146 +24142
+ Partials 2652 1778 -874
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.