)]}'
{
  "commit": "7974adfcbe92e903767e678c0629d2b46fdad026",
  "tree": "7a6612e27a863b2098252bcf427efc877ff2d223",
  "parents": [
    "b4e0242e0540b97780a6e1f116e489e10f635fd5"
  ],
  "author": {
    "name": "Fabio Ponciroli",
    "email": "ponch78@gmail.com",
    "time": "Wed Jun 07 12:19:09 2023 +0200"
  },
  "committer": {
    "name": "Fabio Ponciroli",
    "email": "ponch78@gmail.com",
    "time": "Thu Jun 08 00:43:14 2023 +0200"
  },
  "message": "Fix ExternalId differential loading when cache is inconsistent\n\nJGit may return a failure to update a repository, even if it actually\nsucceeded.\n\nThis can create an issue when loading externalIds, since\nwe would retry to insert the same value into the cache twice,\ndue to the retry performed by the client, leading the cache\nloader to consistently blow up.\n\nFor example:\nExt-Id1:\n * attempt to insert into All-Users: failed on JGit but not on disk [1]\n * the key Ext-Id1 is stored in cache\nExt-Id1:\n * retry to insert into All-Users, because of JGit failure\n * try to add key Ext-Id1 entry BUT it already exists in cache \u003d\u003e BOOM\n\nMake differential loading idempotent to avoid failures due to retry to\ninsert the same entry again.\n\nMake \"buildAllExternalIds\" package-private for testing visibility.\n\n[1]: https://bugs.eclipse.org/bugs/show_bug.cgi?id\u003d582044\n\nBug: Issue 16384\nRelease-Notes: Fix ExternalId differential loading when cache is inconsistent\nChange-Id: Iba6d538451994045b4455829d995dadd38866332\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "8b53d703c8f3a128a5c8d063fb87d7aaeb338c39",
      "old_mode": 33188,
      "old_path": "java/com/google/gerrit/server/account/externalids/ExternalIdCacheLoader.java",
      "new_id": "bf281a5440c469c0816c08f5e4e3cf1e34f045a0",
      "new_mode": 33188,
      "new_path": "java/com/google/gerrit/server/account/externalids/ExternalIdCacheLoader.java"
    },
    {
      "type": "modify",
      "old_id": "0a874db28c1016e77be99a10df2f5cab000d4b38",
      "old_mode": 33188,
      "old_path": "javatests/com/google/gerrit/server/account/externalids/ExternalIDCacheLoaderTest.java",
      "new_id": "d27013803716ab3e5c88ba8336bc5dcc62fbb028",
      "new_mode": 33188,
      "new_path": "javatests/com/google/gerrit/server/account/externalids/ExternalIDCacheLoaderTest.java"
    }
  ]
}
