)]}'
{
  "commit": "3c4d4716169d291fce6b78f6ef3c7d2467845485",
  "tree": "e1f5906c6eb971e7bbc666dfc82aff6432c4ac4f",
  "parents": [
    "28f3e8b7bab9126b0ac5a30176fa7fc9ead1aa8d"
  ],
  "author": {
    "name": "Luca Milanesio",
    "email": "luca.milanesio@gmail.com",
    "time": "Sat Sep 09 03:20:10 2023 +0100"
  },
  "committer": {
    "name": "Luca Milanesio",
    "email": "luca.milanesio@gmail.com",
    "time": "Mon Sep 11 21:41:55 2023 +0100"
  },
  "message": "Fetch change version from refdb on Git protocol v2\n\nThe Git protocol v2 has a reduced refs advertisement\nphase which is limited to the sole refs requested by\nthe client. The implications are that the change /meta\nrevision cannot be extracted anymore from the list of refs\npassed to the filter.\n\nUse a secondary lookup table based on the refdb, in order\nto avoid caching a status or timestamp using only\nthe change-id.\n\nBefore this change, the Git protocol v1 was working as\nexpected, however, requests made using protocol v2 and\nthe only ref pointing to the patch-set were resulting\nin serving stale data from the cache.\n\nThe cache key for the change open status and its\ntimestamp has the following three components:\n- project\n- change id\n- change /meta revision\n\nWhen the change /meta revision was not found in the\nincoming list of refs to filter, the cache lookup\nwas made by simply project and change id.\nThe consequence were disastrous because an open change\nwas cached as being open and never invalidated, even\nif later on it was abandoned or merged.\n\nThe fallback to a direct lookup into the refdb\nwould solve the problem, even though it may add an extra\nlookup with a small performance penalty.\n\nAdd IT test with Git protocol v2 for verifing that the fix works\nwhen the client would request a single patch-set ref to fetch.\n\nBug: Issue 299602346\nChange-Id: I9018dee8de0570857d214935f8f4a32b47960ae0\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "b20f6fb675cd04f8a1771e6bad211944f7f556a6",
      "old_mode": 33188,
      "old_path": "BUILD",
      "new_id": "52ef2e56dd9a3600454018268633c49a643d6d71",
      "new_mode": 33188,
      "new_path": "BUILD"
    },
    {
      "type": "modify",
      "old_id": "5347f2ddab28a17b34821801ff16be3314b82df6",
      "old_mode": 33188,
      "old_path": "src/main/java/com/googlesource/gerrit/modules/gitrefsfilter/ForProjectWrapper.java",
      "new_id": "3b5725b0cba2b51545b8128a067c18918bd676e9",
      "new_mode": 33188,
      "new_path": "src/main/java/com/googlesource/gerrit/modules/gitrefsfilter/ForProjectWrapper.java"
    },
    {
      "type": "modify",
      "old_id": "c58f0b89055fbe60dc3e6ffacf70bf8aa4f33a68",
      "old_mode": 33188,
      "old_path": "src/test/java/com/googlesource/gerrit/libmodule/plugins/test/AbstractGitDaemonTest.java",
      "new_id": "243baa9161401dd4b130261c3c29cb1247a81f7f",
      "new_mode": 33188,
      "new_path": "src/test/java/com/googlesource/gerrit/libmodule/plugins/test/AbstractGitDaemonTest.java"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "0d56ec8853188c15b16a0e6329439dd8536d410e",
      "new_mode": 33188,
      "new_path": "src/test/java/com/googlesource/gerrit/libmodule/plugins/test/GitRefsFilterProtocolV2IT.java"
    },
    {
      "type": "modify",
      "old_id": "c47ebe7d7ef44f1f42354773476ba60c402d28b8",
      "old_mode": 33188,
      "old_path": "src/test/java/com/googlesource/gerrit/libmodule/plugins/test/GitRefsFilterTest.java",
      "new_id": "7663d7688a22bbab8f8469cee10290119720b800",
      "new_mode": 33188,
      "new_path": "src/test/java/com/googlesource/gerrit/libmodule/plugins/test/GitRefsFilterTest.java"
    }
  ]
}
