)]}'
{
  "commit": "aeb7b7fa5537d8f0981d3e73b93b7479186e8137",
  "tree": "36446df70d0189ae4598652e2c0cae06a96f37e5",
  "parents": [
    "2f6cafa26e103beb30b8fc30130405bf1b8c2853"
  ],
  "author": {
    "name": "James Hawkins",
    "email": "jhawkins@google.com",
    "time": "Wed Sep 09 18:12:03 2026 +0000"
  },
  "committer": {
    "name": "James Hawkins",
    "email": "jhawkins@google.com",
    "time": "Wed Sep 09 18:48:20 2026 +0000"
  },
  "message": "Add in-memory CodeOwnerConfigCache across requests\n\nTransientCodeOwnerConfigCache was originally transient to prevent\nreturning stale CodeOwnerConfig entries when getFromCurrentRevision\npassed revision \u003d null.\n\nThis change introduces CodeOwnerConfigCache, a thread-safe in-memory\ncache keyed strictly by (CodeOwnerConfig.Key, ObjectId revision)\nconfigured via CacheModule in BackendModule, exposing it to Gerrit\u0027s\ncache metrics (Prometheus) and administrative commands (show-caches,\nflush-caches).\n\nBecause entries are keyed by immutable Git commit ObjectIds, entries\nnever become stale, and eviction is governed purely by the configured\nmaximum cache size (LRU).\n\nTransientCodeOwnerConfigCache maintains the L1 (request-local) -\u003e L2\n(process-wide) cache hierarchy:\n- L1 hits return in O(1) time without Git ref resolution.\n- On an L1 miss, branch revision is resolved once and L2 is checked.\n- On an L2 hit, L1 is populated for fast subsequent lookups, respecting\n  the per-request cache size limit.\n- On an L2 miss, the config is loaded and cached in both L1 and L2.\n- Non-existent branches are cached in L1 to prevent repeated disk I/O.\n\nCost/Benefit:\n- Benefit: Eliminates repeated Git tree walks, distributed blob reads,\n  and OWNERS parsing across the push and submit requirement validation\n  lifecycle, saving an estimated ~500 ms to 1.5+ seconds per patch set\n  upload on large repositories like chromium/src.\n- Cost: Up to ~10-50 MB JVM heap overhead for 10k cached configs.\n\nChange-Id: I1983e074bd896aa2fc1594bb68e0801aa653853b\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "55421e9458f6c60ceba6b729554f00a4594e518d",
      "old_mode": 33188,
      "old_path": "java/com/google/gerrit/plugins/codeowners/backend/BackendModule.java",
      "new_id": "afc5f712d90c58f182596903eb7a9b700c87c56e",
      "new_mode": 33188,
      "new_path": "java/com/google/gerrit/plugins/codeowners/backend/BackendModule.java"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "604a1e444a9c59dc972b1f537bf9f96bb2959e3f",
      "new_mode": 33188,
      "new_path": "java/com/google/gerrit/plugins/codeowners/backend/CodeOwnerConfigCache.java"
    },
    {
      "type": "modify",
      "old_id": "14f0b986282d24679551ef25a078432ddf3b40f6",
      "old_mode": 33188,
      "old_path": "java/com/google/gerrit/plugins/codeowners/backend/TransientCodeOwnerConfigCache.java",
      "new_id": "e384912900803346214d223d52bc7443bdf9e778",
      "new_mode": 33188,
      "new_path": "java/com/google/gerrit/plugins/codeowners/backend/TransientCodeOwnerConfigCache.java"
    },
    {
      "type": "modify",
      "old_id": "c139ec7aad4b26e91a8dc0c8d28d6b80750b9b21",
      "old_mode": 33188,
      "old_path": "javatests/com/google/gerrit/plugins/codeowners/backend/BUILD",
      "new_id": "0e085b31543ce64337e75fa424d1ed8581cac716",
      "new_mode": 33188,
      "new_path": "javatests/com/google/gerrit/plugins/codeowners/backend/BUILD"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "7a7f8c83e3b24071df96506a59c1429f89058b62",
      "new_mode": 33188,
      "new_path": "javatests/com/google/gerrit/plugins/codeowners/backend/CodeOwnerConfigCacheTest.java"
    }
  ]
}
