Prevent the synchronous replication of create-refs via apply-object

Allow to prevent the create-refs replication events from being
replicated via apply-object synchronously.

This helps fixing the inconsistencies created by out-of-order execution
of multiple create/delete of the same ref multiple times. Replicating
multiple non-ff updates such as create/delete refs may lead to
inconsistencies due to the unpredictable order of their execution on the
remote endpoints.

By default all the create-refs are still being replicated via
apply-object, however, should some refs being created and deleted
multiple times, it is possible to disable their synchronous replication
using the following setting on the replication.config:

[replication]
  applyObjectBannedCreateRefs = refs/heads/myvolatile/*

The above configuration will disable the synchronous replication of all
create-refs under refs/heads/myvolatile/*.

Bug: Issue 397737226
Change-Id: I60577748ca127264dde937a9d242aa0338ad758d
4 files changed
tree: 464cd9c193daab261861d1fb4531ace7ca4ba5c6
  1. example-setup/
  2. src/
  3. .gitignore
  4. BUILD
  5. Jenkinsfile
  6. LICENSE