| commit | 35362a8c47deaf1920ae5ccce5fccf4d755296fc | [log] [tgz] |
|---|---|---|
| author | Thomas Draebing <thomas.draebing@sap.com> | Mon Nov 06 09:53:58 2023 +0100 |
| committer | Thomas Dräbing <thomas.draebing@sap.com> | Mon Nov 06 12:44:36 2023 +0100 |
| tree | cf36986770c30be873225ea3bb309e9608a7d447 | |
| parent | 6b0420e622df5f6d3033142846d5efb59c063aad [diff] |
Ensure project cache state during revert of rename Since I3724dfead the project cache caches non-existing projects. During the revert of a rename, this caused indexing of changes to fail, since the cache entry of the old project was outdated. The cache entry of the old project is now evicted as part of the cache revert. This removes the entry that was created, when the project was renamed. Change-Id: I3abc0f1669949324cfc1cc4ea7322e230a556779
diff --git a/src/main/java/com/googlesource/gerrit/plugins/renameproject/cache/CacheRenameHandler.java b/src/main/java/com/googlesource/gerrit/plugins/renameproject/cache/CacheRenameHandler.java index 5b16875..af848bf 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/renameproject/cache/CacheRenameHandler.java +++ b/src/main/java/com/googlesource/gerrit/plugins/renameproject/cache/CacheRenameHandler.java
@@ -33,6 +33,7 @@ public void update(Project.NameKey oldProjectKey, Project.NameKey newProjectKey) throws IOException { projectCache.remove(oldProjectKey); + projectCache.evict(newProjectKey); projectCache.onCreateProject(newProjectKey); } }