Enable remote.NAME.enableBatchedRefs by default The batch ref-upate processing is now complete and can be enabled by default, because of being the safest option to replicate updates to the remote replication endpoints. Change-Id: Iee482030843135cae3cbc557957033641099d18f
diff --git a/src/main/java/com/googlesource/gerrit/plugins/replication/pull/SourceConfiguration.java b/src/main/java/com/googlesource/gerrit/plugins/replication/pull/SourceConfiguration.java index 00fa23d..d481dbb 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/replication/pull/SourceConfiguration.java +++ b/src/main/java/com/googlesource/gerrit/plugins/replication/pull/SourceConfiguration.java
@@ -121,7 +121,7 @@ DEFAULT_DRAIN_SHUTDOWN_TIMEOUT_SECS, TimeUnit.SECONDS); - enableBatchedRefs = cfg.getBoolean("remote", name, "enableBatchedRefs", false); + enableBatchedRefs = cfg.getBoolean("remote", name, "enableBatchedRefs", true); if (!enableBatchedRefs) { logger.atWarning().log( "You haven't enabled batched refs in the %s node, as such you are not "
diff --git a/src/main/resources/Documentation/config.md b/src/main/resources/Documentation/config.md index acc636b..abc96ca 100644 --- a/src/main/resources/Documentation/config.md +++ b/src/main/resources/Documentation/config.md
@@ -603,23 +603,14 @@ everything from all remotes. remote.NAME.enableBatchedRefs -: Choose whether the batch-apply-object endpoint is enabled. - If you set this to `true`, then there will be a single call - to the batch-apply-object endpoint with all the refs from - the batch ref update included. The default behaviour means - one call to the apply object(s) endpoint per ref. - - *NOTE*: the default value is only needed for backwards - compatibility to allow migrating transparently to the - latest pull-replication plugin version. Once the migration is - over, this value should be set to `true` to leverage the - performance improvements introduced by the `batch-apply-object` API. +: Keep the synchronous replication actions together as a single call + with all the refs included in the batch ref update. > *NOTE*: if any ref from a single batch matches `replication.syncRefs` > filter, all refs in that batch are going to be fetched synchronously as > a single git fetch operation. > -> By default, false. +> By default, true. Directory `replication` --------------------