)]}'
{
  "commit": "f0b8c225e060c49072c5a000d5462cb46f5c5b53",
  "tree": "cae18665a6f9b1a67dc9c1f56c67674a43d1ebb2",
  "parents": [
    "796f1f48e9cb8743f4bad4d9779cf57069b92fdc"
  ],
  "author": {
    "name": "Kaushik Lingarkar",
    "email": "klingarkar@nvidia.com",
    "time": "Thu Aug 06 08:11:21 2026 -0700"
  },
  "committer": {
    "name": "Kaushik Lingarkar",
    "email": "klingarkar@nvidia.com",
    "time": "Thu Aug 06 15:47:03 2026 -0700"
  },
  "message": "Distributor: Skip re-fire of already pending tasks\n\nOn every cycle the distributor streams all tasks under waiting/ and\ncalls fireFromStorage() for each one, which allocates a fresh\nReplicationState and consolidates it into the pending PushOne for that\nURI. PushOne deduplicates refs, since refBatchesToPush is a Set, but\nits stateMap is a ListMultimap that appends unconditionally. A task\nthat stays in waiting/ across cycles therefore grows the pending\ntask\u0027s notification list by one entry per ref per cycle while adding\nno work at all.\n\nThe distributor already snapshots the ref updates carried by pending\npush tasks, in order to prune queue entries whose stored counterpart\nis gone. Each streamed update is removed from that snapshot, leaving\nonly the prunable ones behind by the end. Reuse that removal as the\ntest, i.e a non-null result means a pending task on this node is already\nholding the update, so re-firing it would append a redundant state. Skip\nit, and let only updates with no pending task reach fireFromStorage().\nTasks written by another primary are absent from the snapshot and\ncontinue to be fired, so cluster distribution is unaffected.\n\nThis change removes the repeat re-fires when Prune.TRUE rather than\nevery possible source of stateMap growth. The startup replay passes\nPrune.FALSE and is deliberately left uncovered. It walks each waiting/\nfile exactly once, so no task is fired twice into the same pending push\nand the growth is not reachable there today.\n\nChange-Id: Ib9e77f9cf99cab3d5a6f110f0578ae02eafe9198\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "9abf407ff385e0eb2d77c2ec595110cbf0006f10",
      "old_mode": 33188,
      "old_path": "src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationQueue.java",
      "new_id": "98270914e9d3f6fab5ffe0ec29614941bd86cc32",
      "new_mode": 33188,
      "new_path": "src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationQueue.java"
    },
    {
      "type": "modify",
      "old_id": "dc730368dd4b79dd572591881ac097b9a8768432",
      "old_mode": 33188,
      "old_path": "src/test/java/com/googlesource/gerrit/plugins/replication/ReplicationDistributorIT.java",
      "new_id": "5256bbe5b47069821b1f18aa2e493143ddc44558",
      "new_mode": 33188,
      "new_path": "src/test/java/com/googlesource/gerrit/plugins/replication/ReplicationDistributorIT.java"
    },
    {
      "type": "modify",
      "old_id": "0fabf573cd98332ed9619ca87a1c4e7b9201e0a0",
      "old_mode": 33188,
      "old_path": "src/test/java/com/googlesource/gerrit/plugins/replication/ReplicationQueueTest.java",
      "new_id": "adb16c9156acc80215abab9b0574252b1dcf4d5d",
      "new_mode": 33188,
      "new_path": "src/test/java/com/googlesource/gerrit/plugins/replication/ReplicationQueueTest.java"
    }
  ]
}
