Schedule groups-backends in a queue

When loading groups from an auth backend (for example LDAP), Gerrit is
subject to its latency. This might be a problem because a slow backend,
or a very large number of groups, or both, might cause the warm-cache
command to last longer than the allowed timeouts imposed by Gerrit (or a
load balancer that fronts it).

Schedule the loading of the cache asynchronously over a new dedicated
queue named: "Groups-Backend-Cache-Warmer".

This allows to terminate the SSH command in a timely manner, while
loading the cache in the background.

The status of the cache loading can be observed via the `show-queue`
command as well as the `queue/groups_backend_cache_warmer/*` metrics.

Currently the size of the queue is not configurable and it is set to 8
threads.

Change-Id: Iccbb1f05bcf04c540a68e1d70cd6be9078a50815
1 file changed
tree: 55fe41f72a69c05ea35aecfacd006e470b4d1167
  1. admin/
  2. README.md
README.md

Gerrit scripting plugins collection

Overview

This repository contains a collection of Gerrit scripting plugins that are intended to provide simple and useful extensions.

How to run the scripting plugins

Gerrit needs to be able to recognise the scripts syntax and being able to load them as plugins.

In order to be able to run Groovy scripts, you need to install first the Groovy scripting provider and then copy the Groovy scripts under your Gerrit /plugins directory.

Similarly for Scala scripts, you need to install the Scala scripting provider and then copy the Scala scripts under your Gerrit /plugins directory.

Administration Scripts