Allow setting remote.NAME.threads=0 for persist-only mode
Setting 'remote.NAME.threads' to 0 now puts a remote into a
persist-only mode on the current node. No thread pool is created and
the node performs no pushes, project deletions or HEAD updates for
that remote. Replication tasks are still written to the task storage.
This supports multi-primary deployments where a user-facing primary
only records replication work, while a separate non user-facing
primary (configured with threads > 0 and distributor enabled) picks
the tasks up from the shared storage and performs the actual pushes.
Also, when a node has no push-enabled remotes, both recovery and the
startup replay are skipped entirely.
A caveat to setting threads to '0' is that project deletions and HEAD
updates originating on a persist-only node are not replicated by other
nodes, as they are not persisted to the task storage. If needed, support
for persisting them can be added in future changes.
Change-Id: I022865cbd7105563b5760ca05ae85847e0d7b97b
6 files changed