)]}' { "commit": "d0e872ef2835ce439f020322fad9678cb96f7e1b", "tree": "ed5b48f09441b8708235a178debd9bb3c856878c", "parents": [ "8a25e22d7e82bdd7e27ec05a6f6698445bd13ff7" ], "author": { "name": "Prudhvi Akhil Alahari", "email": "prudhvi.alahari@linaro.org", "time": "Fri Feb 10 10:27:03 2023 +0530" }, "committer": { "name": "Prudhvi Akhil Alahari", "email": "prudhvi.alahari@linaro.org", "time": "Mon Feb 13 12:18:51 2023 +0530" }, "message": "Evict ref from the ref cache even when ref update fails\n\nIf for some reason there is a miss-match between a persisted ref value\nand the cached value of that ref, it is likely to result in a ref-update\nfailure. There are many places in Gerrit where code is retried on\nref-update failures with the hopes that the failure can be recovered\nfrom. To make this recovery possible, it is essential to ensure that\nthe outdated cached ref value no longer be used, and evicting the cached\nvalue even on failures makes this possible.\n\nSome reasons where cached ref values could be outdated are: 3rd party\nactors modifying the repos outside of Gerrit, multi-primary setups.\nFor example, consider a multi-primary Gerrit setup with 2 primaries\npointing to the repositories on NFS. When one primary receives a review\ncommand and at the same time another primary updates the same change\nwith a new patchset and succeeds, then the review command would fail\nwith Lock failure. In this case, review command would retry the\noperation, but it fails again because the cached ref value is still\noutdated.\n\nIn order for a retry operation to succeed, we need to invalidate the\nref from the cache when ref update fails.\n\nChange-Id: I724d5ba3d756e6a22a0b8c64be7ebd4f82d69d14\n", "tree_diff": [ { "type": "modify", "old_id": "c3b8537a1ebe788639298f416abae538789a9ab1", "old_mode": 33188, "old_path": "src/main/java/com/googlesource/gerrit/plugins/cachedrefdb/BatchRefUpdateWithCacheUpdate.java", "new_id": "cf1340f324e526c36b7da61776649cde49c35594", "new_mode": 33188, "new_path": "src/main/java/com/googlesource/gerrit/plugins/cachedrefdb/BatchRefUpdateWithCacheUpdate.java" }, { "type": "modify", "old_id": "f6debce3832050b77b5e3602157b79fa077657ca", "old_mode": 33188, "old_path": "src/main/java/com/googlesource/gerrit/plugins/cachedrefdb/RefRenameWithCacheUpdate.java", "new_id": "ed99ff3eaeb052da0199c2da9931c43b0a6283d8", "new_mode": 33188, "new_path": "src/main/java/com/googlesource/gerrit/plugins/cachedrefdb/RefRenameWithCacheUpdate.java" }, { "type": "modify", "old_id": "76579ce1ecf286aa8ed35b730959041211ea3400", "old_mode": 33188, "old_path": "src/main/java/com/googlesource/gerrit/plugins/cachedrefdb/RefUpdateWithCacheUpdate.java", "new_id": "99e3dc7c642d342523601da75fb1d5d70f398584", "new_mode": 33188, "new_path": "src/main/java/com/googlesource/gerrit/plugins/cachedrefdb/RefUpdateWithCacheUpdate.java" } ] }