Implement PureRevertCache
Computing if a change is a pure revert of another change or commit
is an expensive operation as it requires a Git merge. This is especially
true for large Git repositories.
However, this information is easy to cache in a persistent cache as it
can be keyed by the SHA1s of the commits that we want to diff. Given
that this computation runs many times if the Prolog fact is used because
we freshly compute the submit rules often, this commit builds a
persisted cache for it.
There are many existing tests that cover the behavior in ChangeIT.
This commit adds a serializer for Protobuf to ensure we are not using
the default Java serialization as well as a test.
Change-Id: Id79e2fb2f6646d8e48fdfc3a3b0bcf03f51b1400
diff --git a/Documentation/config-gerrit.txt b/Documentation/config-gerrit.txt
index 8479a8e..c0f195d 100644
--- a/Documentation/config-gerrit.txt
+++ b/Documentation/config-gerrit.txt
@@ -979,6 +979,11 @@
Caches parsed `rules.pl` contents for each project. This cache uses the same
size as the `projects` cache, and cannot be configured independently.
+cache `"pure_revert"`::
++
+Result of checking if one change or commit is a pure/clean revert of
+another.
+
cache `"sshkeys"`::
+
Caches unpacked versions of user SSH keys, so the internal SSH daemon