)]}'
{
  "commit": "2ed442652fe36dfd1fb1ce061717a8d96c3f2c39",
  "tree": "87ae5c98275c28024baaa21870ebe5435f5832ce",
  "parents": [
    "07b2bf3d4a755c13d282d1ba440eb217e7b8f3d9"
  ],
  "author": {
    "name": "Jacek Centkowski",
    "email": "geminica.programs@gmail.com",
    "time": "Fri Dec 22 12:00:20 2023 +0100"
  },
  "committer": {
    "name": "Jacek Centkowski",
    "email": "geminica.programs@gmail.com",
    "time": "Thu Dec 28 20:17:28 2023 +0100"
  },
  "message": "Listen to OnlineUpgradeListener.onSuccess event\n\nIssue:\nDuring the Gerrit upgrade sometimes there is also an index upgrade\ntherefore Gerrit starts with the old index version set as ready and\nissues an on-line reindex. It finally switches to the new version and\nmarks it as ready (marking the previous one as not-ready).\n\nSolution:\nUpon the Gerrit start detect the index version as it was before (IOW\nmonitor the old version\u0027s lock files). But in addition listen to the\n`OnlineUpgradeListener.onSuccess` event and in case when `changes`\non-line reindex gets finished and its version changed switch to monitor\nthe new changes index version lock files.\n\nThe following scenarios were tested:\n* gerrit 3.8.3 site was initiated and ~200 changes were created\n* gerrit 3.9.1 init was performed and healthcheck plugin was dropped to\n  plugins\n* gerrit 3.9.1 was started and `healthcheck~status` endpoint was called\n  a few times while reindex of changes was performed - all `passed`\n* switch to newer changes index version locks was confirmed with the\n  following log entry:\n\n    QueryChangesHealthCheck : Changes index healthcheck switched from index version 82 to 84\n\n  but also by removing `write.lock` from old version (healtcheck passed)\n  and from new version (healtheck failed) as expected\n* calling manual reindex on the same version was ignored by healtcheck\n  - again as expected\n\nBug: Issue 40015289\nChange-Id: I6c2f8feebadafeb89f4ac8c17bce4b96ab8a5685\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "d88c4454a3cf93694d158974ef8a56717884737c",
      "old_mode": 33188,
      "old_path": "src/main/java/com/googlesource/gerrit/plugins/healthcheck/HealthCheckSubsystemsModule.java",
      "new_id": "bff5c13199092041272bd5d17b206b42d7f6d21e",
      "new_mode": 33188,
      "new_path": "src/main/java/com/googlesource/gerrit/plugins/healthcheck/HealthCheckSubsystemsModule.java"
    },
    {
      "type": "modify",
      "old_id": "176cea9b6e4838024b0467a6622dbb3539608bf4",
      "old_mode": 33188,
      "old_path": "src/main/java/com/googlesource/gerrit/plugins/healthcheck/check/ChangesIndexHealthCheck.java",
      "new_id": "bd16b7bd94074779226306528a850f8b7aa9d9a5",
      "new_mode": 33188,
      "new_path": "src/main/java/com/googlesource/gerrit/plugins/healthcheck/check/ChangesIndexHealthCheck.java"
    }
  ]
}
