)]}'
{
  "commit": "8bbffd09e92a35644ac6d94f734e6ee93f532481",
  "tree": "4b2aa6d4134cc6acfa4c50a7a4a5ecc0ec85905b",
  "parents": [
    "5a79d0b70d3456b291775885d0e13e3a09e20546"
  ],
  "author": {
    "name": "Luca Milanesio",
    "email": "luca.milanesio@gmail.com",
    "time": "Fri Oct 31 15:56:56 2025 +0000"
  },
  "committer": {
    "name": "Luca Milanesio",
    "email": "luca.milanesio@gmail.com",
    "time": "Sat Nov 01 02:35:35 2025 -0700"
  },
  "message": "Allow submission of changes when the index record is stale\n\nThe Gerrit change index is a way to find changes and is not guaranteed\nto be aligned in real-time with the underlying change NoteDb status.\n\nWhen a change index entry is stale, but the change is submittable,\nGerrit just executed a cycle of retries, hoping that the index would\nbecome aligned within the retry period.\n\nIntroduce change.backfillMergeSuperSet for allowing the backfill\nof change data from NoteDb when a stale change index is preventing\nthe submit to succeeed.\nBy default, the backfill does not happen and the submit is retried\nmultiple times, waiting for the change index be aligned.\n\nBy looking at the code, the change to be submitted is looked up in the\nchange index by project/branch/version-sha1, to obtain the same\nChangeData again from the index in the byCommitsOnBranchNotMerged()\nmethod; whilst the need to look up changes by\nproject/branch/version-sha1 is mandatory for the dependent changes, it\nisn\u0027t for the change to be merged.\n\nWhen executing the logic to merge a change from the\ncompleteWithoutTopic() path, the change-set to be merged is passed as\ninput parameter and therefore is already known. The use of the index to\nfind the same ChangeData from a potentially stale change index lookup is\nunneeded and, in the best-case scenario, would result in returning the\nsame data that already exists in memory.\n\nUse the input ChangeSet to backfill the set of changes to be\nmerged, so that if the change is found in the index, the looked-up entry\nis still returned, but if that isn\u0027t present because of a stale index,\nthe merge can still be completed with the information already known.\n\nThe case of a temporary stale index is real and can happen in three\nconfigurations:\n\n1. Single Gerrit primary node, with index.indexChangesAsync\u003dtrue\n2. Gerrit HA with more than one Gerrit primary node, when the submit\n   happens on the secondary node\n3. Gerrit Multi-Site, where the submission happens on a different site\n   compared to the one that has received the latest patch-set update.\n\nNOTE: In case of 3, if the node executing the submission isn\u0027t\nup-to-date with the global-refdb, the ref-update would fail anyway, so\nit is still safe to try to execute the submit operation without the risk\nto run into a split-brain situation.\n\nBug: Issue 456521736\nRelease-Notes: Avoid change N missing from ChangeSet[][] when submitting a change with a stale index entry\nChange-Id: I61db3e2b4526be42e4c902ae6ee7e7b9e7bff809\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "730487ba346f40e07cd02bb4f9610ae19c5c5933",
      "old_mode": 33188,
      "old_path": "Documentation/config-gerrit.txt",
      "new_id": "6f1fc9f59c929f1ef2e0713d1c1be9aea2e2f6dc",
      "new_mode": 33188,
      "new_path": "Documentation/config-gerrit.txt"
    },
    {
      "type": "modify",
      "old_id": "2e66941fdb9cec4852358da2df061dfe0d997970",
      "old_mode": 33188,
      "old_path": "java/com/google/gerrit/server/submit/LocalMergeSuperSetComputation.java",
      "new_id": "368fac5fcce6e6fd58e605d9208e30525b2ab61d",
      "new_mode": 33188,
      "new_path": "java/com/google/gerrit/server/submit/LocalMergeSuperSetComputation.java"
    },
    {
      "type": "modify",
      "old_id": "5ea236960903e22045ab8290e665b0830418418d",
      "old_mode": 33188,
      "old_path": "java/com/google/gerrit/server/submit/MergeOp.java",
      "new_id": "67e40e693782b19320acdd9cf527e391077c58bf",
      "new_mode": 33188,
      "new_path": "java/com/google/gerrit/server/submit/MergeOp.java"
    },
    {
      "type": "modify",
      "old_id": "cef2cbb3f01bd705d2593b338d988161eed25d71",
      "old_mode": 33188,
      "old_path": "java/com/google/gerrit/server/submit/MergeSuperSet.java",
      "new_id": "4190a7d55cd53014ec763efb9dc7e88be85a47a4",
      "new_mode": 33188,
      "new_path": "java/com/google/gerrit/server/submit/MergeSuperSet.java"
    },
    {
      "type": "modify",
      "old_id": "99239e3aaa7b0185e14e08eccce394f310861011",
      "old_mode": 33188,
      "old_path": "java/com/google/gerrit/server/submit/MergeSuperSetComputation.java",
      "new_id": "ee9b84931b114dbc01ca1a21aa5033d3c925d1e3",
      "new_mode": 33188,
      "new_path": "java/com/google/gerrit/server/submit/MergeSuperSetComputation.java"
    },
    {
      "type": "modify",
      "old_id": "25af040902c1e3b65183063139ad88457782cf09",
      "old_mode": 33188,
      "old_path": "javatests/com/google/gerrit/acceptance/rest/change/AbstractSubmit.java",
      "new_id": "d40fb91595bb4e88f763f59a744ec695f9168435",
      "new_mode": 33188,
      "new_path": "javatests/com/google/gerrit/acceptance/rest/change/AbstractSubmit.java"
    }
  ]
}
