v3.5.0-rc3
Add possibility to split large pushes to remote into batches

Allow to split push with a large number of refs into smaller,
size-configurable batches to:
1. allow task cancellation - after each batch gets pushed operation can
   be checked if it was requested to stop
2. set push operation timeout more predictably, with this parameter set
   one can more definitely specify when timeout should occur
3. successfully push to remotes like GitHub, GitLab that enforce limits
   on the number of refs that could be accepted in a single push operation

Note that in case when failure occurs all batches in push are re-attempted
(similarly to what it is now) but refs already pushed result in 'UP_TO_DATE'
status.

One can specify the batch size for all remotes with 'gerrit.pushBatchSize'
parameter of 'replication.config'. It can be also overridden at remote-level
by setting `pushBatchSize`.

By default `0` is assumed which means that there is no limitation on number
of refs in a single push operation (current behaviour is preserved). Note
that negative values are treated as `0`.

Note that when 'Cluster Replication' is enabled pushInBatches results in
more (they happen also when pushInBatches is disabled but in lower
number) ERROR log entries like

  EERROR com.googlesource.gerrit.plugins.replication.ReplicationTasksStorage : Error while deleting task...

Therefore pushInBatches is disabled in that case (even if positive value
is given globaly or for specific remote) and warning is logged once per
remote.

Bug: Issue 13216
Change-Id: I1514855cbb5ac0ea78397a17eb1c5926bf07a4a3
10 files changed
tree: e37ed930b3a2ac6f289b0c4777ce095256f2c7b1
  1. .settings/
  2. src/
  3. .gitignore
  4. .mailmap
  5. BUILD
  6. LICENSE