Original Submission As part of the Gerrit integration, Tuleap must flush a few Gerrit caches after manipulating the database when updating the members of a group. This is a consequence of having to alter database entries to work around the absence of a proper CLI that would otherwise take care of properly doing this operation cleanly.
Currently, based on what I observed, Tuleap flushes *all* chaches after doing its database manipulation. While this guarantees that the database change is made visible to the Gerrit runtime environment, it has a dramatic impact on the performance of our master server. As stipulated in the Gerrit documentation for flush-caches --all:
“This is like applying a big hammer, it will force everything out, potentially more than was necessary for the change made.”
In our case, this results in repopulating the ldap_groups_byinclude cache which can take a significant amount of time, making Gerrit non-responsive during that time.
It is imperative to not flush all caches on the running system unless under an emergency situation. In the case of adding/removing users from a group it would be sufficient to issue a command to flush only the “groups” cache and the “groups_byinclude” cache only. So I would ask you to please change your code so that the following command is executed for flushing caches after a group membership update:
gerrit flush-caches --cache groups --cache groups_byinclude
Please check to confirm if it is sufficient to flush only these two caches or if additional caches need to be considered too.
PS. This is a showstopper for deploying the Gerrit integration at Ericsson.