Skip to content
Snippets Groups Projects
Commit fa2a10c2 authored by Patrick Steinhardt's avatar Patrick Steinhardt
Browse files

remote: Vote when adding and removing remotes

The `AddRemote()` and `RemoveRemote()` RPCs are currently the only ones
which don't cast transactional votes in production. As a result, all
secondaries are always considered as outdated whenever we for example
update object pools or mirrors. Given that these RPCs are typically
executed before these long running actions, the net result is that
secondaries will be out of date most of the time.

Fix the issue by adding transactional voting for `AddRemote()` and
`RemoveRemote()`. In both cases, voting is done on the remote
configuration only, and not on the complete configuration. This may be
inaccurate as the remote may be influenced by other configuration like
for example the `http.<url>.` config entries. But given that we do not
synchronize configuration on replication, it may be risky to instead
vote on the complete configuration as it may have diverged across nodes
and would never recover even after a replication job got processed.

Given that these RPCs are about to be phased out soonish anyway, we just
ignore this issue for now. At least for a subset of fetches, this change
will likely not yet enable transactional behaviour. Instead, we may see
a shift to missing votes in `SetConfig()`, which is used to set up
credentials. We can fix this issue in a follow-up though, especially so
because at that time we'll also need to have replication of the config
to recover from failed votes.

Changelog: added
parent edb6951b
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment