diff --git a/Documentation/config-gerrit.txt b/Documentation/config-gerrit.txt index 5284d8989c..ec55b570ef 100644 --- a/Documentation/config-gerrit.txt +++ b/Documentation/config-gerrit.txt @@ -1716,11 +1716,14 @@ Defaults to the number of available CPUs according to the Java runtime. [[receive.timeout]]receive.timeout:: + -Overall timeout on the time taken to process the change data in received packs. -Only includes the time processing Gerrit changes and updating references, not -the time to index the pack. +Overall timeout on the time taken to process the change data in +received packs. Only includes the time processing Gerrit changes +and updating references, not the time to index the pack. Values can +be specified using standard time unit abbreviations ('ms', 'sec', +'min', etc.). + -Default is 120 seconds. +Default is 2 minutes. If no unit is specified, millisconds +is assumed. [[repository]]Section repository diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/git/AsyncReceiveCommits.java b/gerrit-server/src/main/java/com/google/gerrit/server/git/AsyncReceiveCommits.java index b78f15aae4..c2fe1a2033 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/git/AsyncReceiveCommits.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/git/AsyncReceiveCommits.java @@ -73,8 +73,8 @@ public class AsyncReceiveCommits implements PreReceiveHook { long getTimeoutMillis(@GerritServerConfig final Config cfg) { return ConfigUtil.getTimeUnit( cfg, "receive", null, "timeout", - TimeUnit.SECONDS.convert(2, TimeUnit.MINUTES), - TimeUnit.SECONDS); + TimeUnit.MINUTES.toMillis(2), + TimeUnit.MILLISECONDS); } }