blob: 8762cb082d01cf7c8b80e3554124bf304a9918a6 [file] [log] [blame] [view]
# Config
## Dependencies
Since the @PLUGIN@ plugin relies on some events defined in the `replication`
plugin, the latter must be installed as a library module in the
`$GERRIT_SITE/lib` folder.
It can be a simple symlink as follows:
```bash
cd $GERRIT_SITE/lib
ln -s $GERRIT_SITE/plugins/replication.jar .
```
## Settings
The plugin itself has no specific configuration, however some Gerrit specific
settings are relevant.
### Cache
This plugin relies on a cache to store replication status information, the
global cache configuration settings apply.
Please look at
the [gerrit cache documentation](https://gerrit-review.googlesource.com/Documentation/config-gerrit.html#cache)
for more information on this.
In particular:
* To define the lifespan of replication-status entries in the cache, look at
the [maxAge](https://gerrit-review.googlesource.com/Documentation/config-gerrit.html#cache.name.maxAge)
documentation. *Default*: store forever with no expire
* To define how much disk space the replication-status cache can take, look at
the [diskLimit](https://gerrit-review.googlesource.com/Documentation/config-gerrit.html#cache.name.diskLimit)
documentation. *Default*: disk storage for the cache is disabled
To modify this cache behaviour add the following stanza to the `gerrit.config`,
for example:
```
[cache "replication-status.replication_status"]
diskLimit = 52428800 # 50 Mb
maxAge = 1 day
```
### Gerrit instanceId
This plugin will try to discriminate among events produced by the current
instances versus events produced by different instances.
If the gerrit node running this plugin has
the [gerrit.instanceId]([gerrit.instanceId](https://gerrit-review.googlesource.com/Documentation/config-gerrit.html#gerrit.instanceId))
set to a specific value, it will only consume events that match it.
On the other hand, if the `gerrit.instanceId` is not defined, only events that _
do not_ have instanceId set will be consumed, as events exhibiting different
instanceId values must have been generated by different gerrit nodes.