)]}'
{
  "commit": "56b8ffbab5bf619c0b6b5d44f0255fd41b9e1c89",
  "tree": "cc78f590ac65e6b777711da8dc96d4c41b95d048",
  "parents": [
    "aab69373db6152ea98e7627f816fa3d777d5fe46"
  ],
  "author": {
    "name": "Luca Milanesio",
    "email": "luca.milanesio@gmail.com",
    "time": "Sun Apr 07 10:19:59 2024 -0700"
  },
  "committer": {
    "name": "Luca Milanesio",
    "email": "luca.milanesio@gmail.com",
    "time": "Mon Apr 08 05:26:28 2024 +0000"
  },
  "message": "Load replication configuration only once\n\nReuse the same instance across requests in ReplicationConfigImpl.\nThis avoids reloading the configuration from disk continuously.\n\nPreviously, the config was retrieved on-demand with the Provider\u003c\u003e.get()\nparadigm. However, the Provider\u003c\u003e.get() would trigger the creation of a\nnew instance of the Config every time it is invoked, causing the full\nscan and parsing of the replication configs.\n\nOn GerritHub.io, the processing of all replication configs (12k files)\nwould take around 5 minutes, causing a catastrophic overload of the CPU\nand preventing the plugin that use ReplicationConfigImpl (replication\nand pull-replication) to even start.\n\nWith regards to the configVersion, the description of the interface has\nbeen amended to reflect the expected behaviour to report the\n*latest actual* version on the storage, regardless of the in-memory copy.\n\nThe AutoReloadConfigDectorator relies on the configVersion to reflect\nthe storage version for triggering a configuration reload by forcibly\nre-creating the config resources and therefore triggering the reload and\nparsing of the replication configs from the underlying storage.\n\nAutoReloadConfigDecorator should not reload the configuration again\nin his constructor because the AutoReloadRunnable has already loaded\nthe initial state and therefore can reuse that one as valid starting\npoint.\n\nChange-Id: I6f9c3a35d1ecbfa87f3daeeb464face0c6b6400e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "9c658e04a46d1c00f81b67d322ce4b085f54a642",
      "old_mode": 33188,
      "old_path": "src/main/java/com/googlesource/gerrit/plugins/replication/AutoReloadConfigDecorator.java",
      "new_id": "2c049fc557b423d70837d01bf05be8591513922f",
      "new_mode": 33188,
      "new_path": "src/main/java/com/googlesource/gerrit/plugins/replication/AutoReloadConfigDecorator.java"
    },
    {
      "type": "modify",
      "old_id": "e9198b2aec1804b23a5fd289c624c65d08f26d7c",
      "old_mode": 33188,
      "old_path": "src/main/java/com/googlesource/gerrit/plugins/replication/AutoReloadRunnable.java",
      "new_id": "a752a359b2669517de86de270b385adaf331c433",
      "new_mode": 33188,
      "new_path": "src/main/java/com/googlesource/gerrit/plugins/replication/AutoReloadRunnable.java"
    },
    {
      "type": "modify",
      "old_id": "5e8100b8832fd43caeb5678a37812694c79fae33",
      "old_mode": 33188,
      "old_path": "src/main/java/com/googlesource/gerrit/plugins/replication/MergedConfigResource.java",
      "new_id": "43d90a5dead4bbd3fc289332af4a6e9ef79e716c",
      "new_mode": 33188,
      "new_path": "src/main/java/com/googlesource/gerrit/plugins/replication/MergedConfigResource.java"
    },
    {
      "type": "modify",
      "old_id": "854ca6a1a2d381351bd3dce2ec499137c7f74696",
      "old_mode": 33188,
      "old_path": "src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationConfigImpl.java",
      "new_id": "1223db0e46869379b73214e68f35421b0f1325ed",
      "new_mode": 33188,
      "new_path": "src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationConfigImpl.java"
    },
    {
      "type": "modify",
      "old_id": "8babd01d810dd2951673827299d50392141ed6a9",
      "old_mode": 33188,
      "old_path": "src/main/java/com/googlesource/gerrit/plugins/replication/api/ConfigResource.java",
      "new_id": "43733bc1f8bf8b6a22cf1d8035a8271b33a164c6",
      "new_mode": 33188,
      "new_path": "src/main/java/com/googlesource/gerrit/plugins/replication/api/ConfigResource.java"
    },
    {
      "type": "modify",
      "old_id": "6facf25eec7ab3749dbb099bf1dd7c79d1f9d47a",
      "old_mode": 33188,
      "old_path": "src/test/java/com/googlesource/gerrit/plugins/replication/AutoReloadConfigDecoratorTest.java",
      "new_id": "021707a7ecd175262256e9800359a57c7b5af4d8",
      "new_mode": 33188,
      "new_path": "src/test/java/com/googlesource/gerrit/plugins/replication/AutoReloadConfigDecoratorTest.java"
    }
  ]
}
