Put jgit pack settings in jgit.config

We were setting these values in gerrit.config but it isn't clear if
these now need to go in jgit.config instead. I've tried to clarify with
upstream maintainers as the documentation is quite confusing. While we
wait for clarification why don't we just set the values in both files to
ensure we are covered.

This converts jgit.config to a jinja2 template so that we can use the
variable number of pack files setting.

Change-Id: I70c1e6b738ed6e9fdb72d86e7cf3fb8cfecf1323
This commit is contained in:
Clark Boylan 2020-12-07 12:03:13 -08:00
parent d7b726140d
commit 20b9ce5907
3 changed files with 8 additions and 4 deletions

View File

@ -1,2 +0,0 @@
[receive]
autogc = false

View File

@ -88,8 +88,8 @@
when: gerrit_replication is defined when: gerrit_replication is defined
- name: Write Gerrit JGit config - name: Write Gerrit JGit config
copy: template:
src: jgit.config src: jgit.config.j2
dest: "{{ gerrit_site_dir }}/etc/jgit.config" dest: "{{ gerrit_site_dir }}/etc/jgit.config"
owner: "{{ gerrit_user_name }}" owner: "{{ gerrit_user_name }}"
group: "{{ gerrit_user_name }}" group: "{{ gerrit_user_name }}"

View File

@ -0,0 +1,6 @@
[core]
packedGitOpenFiles = {{ gerrit_packed_git_open_files }}
packedGitLimit = 400m
packedGitWindowSize = 16k
[receive]
autogc = false