Stop removing changes from the cache
The zuul trigger ends up querying a large number of changes on each merge, most of which are not in any pipelines. To avoid needlessly querying gerrit for data that do not change, keep all changes that Zuul ever sees in the cache. We could consider removing changes that are both not in pipelines and closed (ie, keep all open changes), but we still end up querying a number of merged changes each time due to Zuul following dependencies of open changes. Change-Id: Ie78df9aa43ec5ac35bdea79dcdafdfdd41d51d5b
This commit is contained in:
@@ -279,13 +279,9 @@ class Gerrit(object):
|
||||
def maintainCache(self, relevant):
|
||||
# This lets the user supply a list of change objects that are
|
||||
# still in use. Anything in our cache that isn't in the supplied
|
||||
# list should be same to remove from the cache.
|
||||
remove = []
|
||||
for key, change in self._change_cache.items():
|
||||
if change not in relevant:
|
||||
remove.append(key)
|
||||
for key in remove:
|
||||
del self._change_cache[key]
|
||||
# list should be safe to remove from the cache.
|
||||
# TODO(jeblair): consider removing this feature
|
||||
return
|
||||
|
||||
def postConfig(self):
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user