)]}'
{
  "commit": "0dcfc0c60b98f2589557bfc60cde51d09ce9e3f4",
  "tree": "1daed25245e08b2fc67097fa391bd819756e53bf",
  "parents": [
    "53a1bd279bc154a88b93295f0a20ab024c65b2e4"
  ],
  "author": {
    "name": "Fabio Ponciroli",
    "email": "ponch78@gmail.com",
    "time": "Tue Aug 12 17:13:22 2025 -0600"
  },
  "committer": {
    "name": "Luca Milanesio",
    "email": "luca.milanesio@gmail.com",
    "time": "Wed Aug 13 15:12:10 2025 +0100"
  },
  "message": "Add per-project shared lock to avoid fetch collisions\n\nIntroduce a singleton ProjectsLock to coordinate fetches across sources\non a per-project basis without blocking. FetchOne now tries to acquire a\nnon-blocking lock for the project before proceeding; if the lock is busy\nwe reschedule the task to avoid colliding with an in-flight fetch. When\nacquired, the lock is held via a try-with- resources token and we still\nhonor the async runway check.\n\nPrevious changes (I3c3d7b97, I7883e680) attempted to centralize\ncoordination with a shared projects queue, but it dropped the fetch\norigin, which led to fetch events being lost. The new lock-based\napproach keeps the source context intact and guarantees at most one\nconcurrent fetch per project across sources.\n\nBug: Issue 437805590\nChange-Id: I2ce2f5a8532a7282f03f245f3670e8c318de0a61\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "d60c2b7888721dbee4bc415d07df2621ef977015",
      "old_mode": 33188,
      "old_path": "src/main/java/com/googlesource/gerrit/plugins/replication/pull/FetchOne.java",
      "new_id": "76ecd8085af8a8bbbacb287052a328fa80117fcf",
      "new_mode": 33188,
      "new_path": "src/main/java/com/googlesource/gerrit/plugins/replication/pull/FetchOne.java"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "bfcc39649a0c9648a72ec814961c0a5c90069eaf",
      "new_mode": 33188,
      "new_path": "src/main/java/com/googlesource/gerrit/plugins/replication/pull/ProjectsLock.java"
    },
    {
      "type": "modify",
      "old_id": "251f39f6047e281013f3be72acc29b71b9d10b7b",
      "old_mode": 33188,
      "old_path": "src/main/java/com/googlesource/gerrit/plugins/replication/pull/PullReplicationModule.java",
      "new_id": "4f32f260fa06e6fcca22b7e7808504379abebcc7",
      "new_mode": 33188,
      "new_path": "src/main/java/com/googlesource/gerrit/plugins/replication/pull/PullReplicationModule.java"
    },
    {
      "type": "modify",
      "old_id": "1104ff422e6a1cb3121cb86438219475b9d1b619",
      "old_mode": 33188,
      "old_path": "src/test/java/com/googlesource/gerrit/plugins/replication/pull/FetchOneTest.java",
      "new_id": "50d91ffe67e00bb3580a9170d7c0e977e4c3c680",
      "new_mode": 33188,
      "new_path": "src/test/java/com/googlesource/gerrit/plugins/replication/pull/FetchOneTest.java"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "89d12957f827778c798d4b68fef799ade743ce80",
      "new_mode": 33188,
      "new_path": "src/test/java/com/googlesource/gerrit/plugins/replication/pull/ProjectsLockTest.java"
    }
  ]
}
