)]}'
{
  "commit": "2134664cfa0181435ea4df50f9033f600a5ee7d7",
  "tree": "bee783817054ed0780f59fd4ea84724f18769a64",
  "parents": [
    "eea2678590db4bc7040983fc2555739464348ab0"
  ],
  "author": {
    "name": "Ajay Gupta",
    "email": "ajagup@qti.qualcomm.com",
    "time": "Wed Oct 07 13:57:26 2026 +0530"
  },
  "committer": {
    "name": "Ajay Gupta",
    "email": "ajagup@qti.qualcomm.com",
    "time": "Wed Oct 07 14:01:31 2026 +0530"
  },
  "message": "WorkQueue: Do not busy-reschedule canceled or done one-shot tasks\n\nChange a4c7a7384ef made Task.run() reschedule the task whenever its\nrunningState is already set, so that a periodic task that preempts\nits own previous run is not dropped. The reschedule delay is\nnanosPeriod / 3, which is 0 for one-shot tasks, and the branch also\napplies to tasks that will never run again:\n\n* cancel() sets runningState to RUNNING for a CancelableRunnable\n  that has not started, to let it clean up.\n* A finished one-shot task has runningState DONE.\n\nIf a pool thread dequeues such a task just before it is canceled or\nafter it completed, run() reschedules it with no delay, the next run\nreschedules it again, and so on. The task has already been removed\nfrom the queue\u0027s task list, so show-queue does not show it, but the\npool thread spins at 100% CPU indefinitely. In production we observed\ndozens of replication threads, whose PushOne tasks are canceled when\npruned, each burning a full core in this loop.\n\nOnly reschedule periodic tasks that are not canceled or done. A\ncanceled or completed one-shot task has nothing left to do.\n\nRelease-Notes: Fix WorkQueue threads spinning at full CPU after a task was canceled\nChange-Id: I3cc878fedc730643739a58853153b7a49b7d5733\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "888205d00e5cab084de9d6c5762d19f68425054b",
      "old_mode": 33188,
      "old_path": "java/com/google/gerrit/server/git/WorkQueue.java",
      "new_id": "ff3821a9aad07771033d6ee311c9cad2646d20a9",
      "new_mode": 33188,
      "new_path": "java/com/google/gerrit/server/git/WorkQueue.java"
    },
    {
      "type": "modify",
      "old_id": "92aca784b3196e34058c44677506e66b28184f85",
      "old_mode": 33188,
      "old_path": "javatests/com/google/gerrit/acceptance/server/util/WorkQueueIT.java",
      "new_id": "a5604968a9ded09a397bf30c7754750132ae811c",
      "new_mode": 33188,
      "new_path": "javatests/com/google/gerrit/acceptance/server/util/WorkQueueIT.java"
    }
  ]
}
