Closed litingulfs closed 3 months ago
Attention: Patch coverage is 2.05479%
with 143 lines
in your changes missing coverage. Please review.
Project coverage is 70.08%. Comparing base (
52ba813
) to head (ab255f3
). Report is 20 commits behind head on master.
Files | Patch % | Lines |
---|---|---|
...bry/router/ParanoidDurabilityOperationTracker.java | 0.00% | 143 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
The more I think about this, the more i feel that we shouldn't differentiate remote dcs, We should just put all remote replicas in a list. After local dc succeeds, we should just iterate through the remote list. It would probably be a bit cleaner this way.
Yeah, we spoke about this offline, and I've changed the code so that instead of tracking replicas on a DC-by-DC basis, we just track local vs remote replicas. There is a slight cost to this, since we now end up doing more work to sort the remote replicas so that we can alternate between colos and also prefer LEADER replicas, but I think overall the code is now easier to understand.
This PR adds the basic required functionality for paranoid durability, where we require PUTs to succeed in at least one remote colo, reducing the risk of data loss in exceptional situations.
The writes in the local colo follow the same logic as before, but the remote (i.e. cross colo) writes are executed as follows:
I've tested this locally, and as agreed with the rest of the team I'll follow up with pull requests with tests and metrics and the required wiring.