)]}'
{
  "commit": "310060ed9230d24261752728a9b3bd04f2bf8d62",
  "tree": "e16ff020564eae788f69dfc1cf4c630e8445bc34",
  "parents": [
    "b66414979781efc00889800ae83b2c478de7abf2"
  ],
  "author": {
    "name": "Jacek Centkowski",
    "email": "geminica.programs@gmail.com",
    "time": "Wed Aug 31 17:13:36 2022 +0200"
  },
  "committer": {
    "name": "Jacek Centkowski",
    "email": "geminica.programs@gmail.com",
    "time": "Wed Sep 14 07:43:41 2022 +0200"
  },
  "message": "Remove metrics when cache gets closed\n\nWhen plugin with persistent caches gets reloaded it fails to load with\nthe following exception:\n\n  java.lang.IllegalArgumentException: A metric named cache/chroniclemap/percentage_free_space_test-cache-plugin_test_cache already exists\n  ...\n\nThe problem is caused by cache related metrics that are created when\ncache-chroniclemap instantiates the persistent cache implementation for\nplugin that is being reloaded.\n\nThis change ensures that all cache related metrics are removed when cache is\nclosed.\n\nNotes:\n* This is the necessary but not sufficient step to solve #15587.\n  It is enough to solve the happy path when \u0027Gerrit-ReloadMode: restart\u0027.\n  IOW when the old version of plugin with persistent caches gets unloaded\n  before the new version is loaded.\n* Description on how to reload plugin with persistent caches when\n  cache-chroniclemap lib-module is installed was added to migration.md\n\nBug: Issue 15587\nDepends-On: I06d48535702a8acd0bcb4e1315a35b3c1d1768cb\nChange-Id: I03e34dd3463fad00ba8fbc174597c896a93db547\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "c9aff804d2f6972149b729f5443ac7af3d006a64",
      "old_mode": 33188,
      "old_path": "src/main/java/com/googlesource/gerrit/modules/cache/chroniclemap/CacheKeysIndex.java",
      "new_id": "07303800c7914ccfdbcdd5fac5081c4b84ee080c",
      "new_mode": 33188,
      "new_path": "src/main/java/com/googlesource/gerrit/modules/cache/chroniclemap/CacheKeysIndex.java"
    },
    {
      "type": "modify",
      "old_id": "1d600841c3655ad7cbc3dd9a8d0d521a5d6e134b",
      "old_mode": 33188,
      "old_path": "src/main/java/com/googlesource/gerrit/modules/cache/chroniclemap/ChronicleMapCacheImpl.java",
      "new_id": "7efc8b5e3b28f4547bdb207f7a474081f0c0f10b",
      "new_mode": 33188,
      "new_path": "src/main/java/com/googlesource/gerrit/modules/cache/chroniclemap/ChronicleMapCacheImpl.java"
    },
    {
      "type": "modify",
      "old_id": "0419ca49ad3938d9defe308d65bd21d59151a1a9",
      "old_mode": 33188,
      "old_path": "src/main/java/com/googlesource/gerrit/modules/cache/chroniclemap/ChronicleMapStore.java",
      "new_id": "38759f4be2505c54377ca526a79d016623a87664",
      "new_mode": 33188,
      "new_path": "src/main/java/com/googlesource/gerrit/modules/cache/chroniclemap/ChronicleMapStore.java"
    },
    {
      "type": "modify",
      "old_id": "cf758b58980e11e685bc56b0728769b2268bb235",
      "old_mode": 33188,
      "old_path": "src/main/java/com/googlesource/gerrit/modules/cache/chroniclemap/ChronicleMapStoreMetrics.java",
      "new_id": "c27be997733d9ee1759a7a7c5cd362c4adbf7b9f",
      "new_mode": 33188,
      "new_path": "src/main/java/com/googlesource/gerrit/modules/cache/chroniclemap/ChronicleMapStoreMetrics.java"
    },
    {
      "type": "modify",
      "old_id": "b49a65dfbaa97af33f6c57656402df1a1422ff5b",
      "old_mode": 33188,
      "old_path": "src/main/java/com/googlesource/gerrit/modules/cache/chroniclemap/SerializationMetricsForCache.java",
      "new_id": "098e8c623e9b6563531631f33f43cef0fb216f1b",
      "new_mode": 33188,
      "new_path": "src/main/java/com/googlesource/gerrit/modules/cache/chroniclemap/SerializationMetricsForCache.java"
    },
    {
      "type": "modify",
      "old_id": "261f08f240921f175b5cb5254f7694bc7a8e88ba",
      "old_mode": 33188,
      "old_path": "src/main/resources/Documentation/migration.md",
      "new_id": "f0aed00b9bd12fafc98c2d362822e7f32a053024",
      "new_mode": 33188,
      "new_path": "src/main/resources/Documentation/migration.md"
    }
  ]
}
