linkedin / ambry

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

Use ParanoidDurabilityOperationTracker when configured and turned on. #2806

Closed litingulfs closed 2 months ago

litingulfs commented 2 months ago

This PR wires up ParanoidDurabilityOperationTracker for PUT requests when both of these conditions are true:

  1. The container that we are trying to write to is configured to use paranoid durability (i.e. require a success from at least one remote colo).
  2. The application is configured to use paranoid durability.

We require an extra configuration (item 2) as a kind of safety switch. If we discover a problem with paranoid durability, then we can turn it completely off globally by updating the configuration value and doing a config deployment. It also enables us to roll out the new feature in a fabric-by-fabric manner rather than turning it on everywhere at the same time for a given container.

Turning on paranoid durability for a given container (item 1 above) can be done for several containers at once by updating the account metadata, essentially by pushing an updated JSON file to ambry-frontend. Changing pre-existing containers like this is more of an operations task and is out of scope for this PR.

We will follow up later with changes to ambry-client in order for clients to turn on paranoid durability when they create new containers programmatically.

codecov-commenter commented 2 months ago

Codecov Report

Attention: Patch coverage is 57.14286% with 3 lines in your changes missing coverage. Please review.

Project coverage is 70.22%. Comparing base (52ba813) to head (21965bb). Report is 30 commits behind head on master.

Files Patch % Lines
...ain/java/com/github/ambry/router/PutOperation.java 50.00% 1 Missing and 2 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2806 +/- ## ============================================ + Coverage 64.24% 70.22% +5.97% - Complexity 10398 11751 +1353 ============================================ Files 840 842 +2 Lines 71755 72282 +527 Branches 8611 8700 +89 ============================================ + Hits 46099 50759 +4660 + Misses 23004 18867 -4137 - Partials 2652 2656 +4 ```

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