Increase the value of GERRIT_FDS parameter

GERRIT_FDS is set to double of core.packedGitOpenFiles, which is
not sufficient to account for the file descriptors used by Git LFS.

If Git LFS plugin is enabled triple the value instead of doubling it.

Note the value of core.packedGitOpenFiles also relates to the
packedGitLimit, which is why it is not suggested to simply increase
the configured value.

Change-Id: Ibdf4d03f91611cdaf20f1e5ab7cffd83c1a62831
Signed-Off-By: Eryk Szymanski <eryksz@gmail.com>
This commit is contained in:
Eryk Szymanski 2017-05-18 12:26:14 +02:00
parent 27e3f374ee
commit 2639d7cb27
1 changed files with 5 additions and 1 deletions

View File

@ -285,7 +285,11 @@ fi
GERRIT_FDS=`get_config --int core.packedGitOpenFiles`
test -z "$GERRIT_FDS" && GERRIT_FDS=128
GERRIT_FDS=`expr $GERRIT_FDS + $GERRIT_FDS`
FDS_MULTIPLIER=2
USE_LFS=`get_config --get lfs.plugin`
test -n "$USE_LFS" && FDS_MULTIPLIER=3
GERRIT_FDS=`expr $FDS_MULTIPLIER \* $GERRIT_FDS`
test $GERRIT_FDS -lt 1024 && GERRIT_FDS=1024
GERRIT_STARTUP_TIMEOUT=`get_config --get container.startupTimeout`