)]}'
{
  "commit": "355ad8f5d24b671f21820c191446f1e4ac264f30",
  "tree": "15511ffb6fb2e2fa13114fbd5ac9555844467854",
  "parents": [
    "5f6c3148fe2bab8cdbb1d55ab93fb4abe1661591"
  ],
  "author": {
    "name": "Fabian Meumertzheim",
    "email": "fabian@buildbuddy.io",
    "time": "Tue Aug 25 10:09:30 2026 -0700"
  },
  "committer": {
    "name": "Copybara-Service",
    "email": "copybara-worker@google.com",
    "time": "Tue Aug 25 10:12:32 2026 -0700"
  },
  "message": "Let TaskDeduplicator callers decide which executions to join (https://github.com/bazelbuild/bazel/pull/30516)\n\n### Description\n\n`TaskDeduplicator` deduplicated executions by key alone, so callers with different requirements either shared an execution that didn\u0027t satisfy all of them or had to be separated into different keys, which also gives up sharing in the direction where it is safe.\n\nEvery execution is now started with caller-provided attributes and every caller supplies a predicate over them, so the join relation can be asymmetric: a caller that needs little joins an execution that produces more, while a caller that needs more starts its own and takes over as the execution that subsequent callers see. The decision is made inside a single `ConcurrentHashMap.compute`, which also lets the retry loop around a concurrently canceled execution go away. `executeIfNew` and `executeUnconditionally` are replaced by a single `execute`.\n\n`maybeJoinExecution` is removed as its only use is questionable: Having a `DISCARD` build wait for a `KEEP` build is not a clear performance win since the latter may issue network calls.\n\nThis also fixes a caller that cancels its future releasing its reference to the shared execution twice: `IndividuallyCancelableFuture` completed itself with `setFuture`, which cancels its argument when it has already been canceled. This was harmless as used today, but not obvious without referring to Guava code and potentially problematic for future changes.\n\n### Motivation\n\nSimplify the interface of `TaskDeduplicator` and make its inner working more obvious. At the same time, make the reuse of ongoing executions more explicit and flexible in `MerkleTreeComputer`.\n\n### Build API Changes\n\nNo\n\n### Checklist\n\n- [x] I have added tests for the new use cases (if any).\n- [ ] I have updated the documentation (if applicable).\n\n### Release Notes\n\nRELNOTES: None\n\nCloses #30516.\n\nPiperOrigin-RevId: 970629545\nChange-Id: Ib041dbc815d33349dcf137a3720864d8ac26ea51\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "a1c76c844d4e3fcaa6553bb4d864d70980103266",
      "old_mode": 33188,
      "old_path": "src/main/java/com/google/devtools/build/lib/concurrent/BUILD",
      "new_id": "246dbe22e0feae28c21fa12ab1cb6d4adb023e0b",
      "new_mode": 33188,
      "new_path": "src/main/java/com/google/devtools/build/lib/concurrent/BUILD"
    },
    {
      "type": "modify",
      "old_id": "849e8c1ea19ccd225d6a648485152033dd1cf2f3",
      "old_mode": 33188,
      "old_path": "src/main/java/com/google/devtools/build/lib/concurrent/TaskDeduplicator.java",
      "new_id": "ead3df8d27be597d2ae2a3a6a28599f91a596bd6",
      "new_mode": 33188,
      "new_path": "src/main/java/com/google/devtools/build/lib/concurrent/TaskDeduplicator.java"
    },
    {
      "type": "modify",
      "old_id": "38130292c9c300461f182cc0ca084adb7b8672d5",
      "old_mode": 33188,
      "old_path": "src/main/java/com/google/devtools/build/lib/remote/RemoteExternalOverlayFileSystem.java",
      "new_id": "49448c37bae64590729347c399a2dcb1139f2c0c",
      "new_mode": 33188,
      "new_path": "src/main/java/com/google/devtools/build/lib/remote/RemoteExternalOverlayFileSystem.java"
    },
    {
      "type": "modify",
      "old_id": "8fe40904b1546bc1f0180ec1c314381deafb588a",
      "old_mode": 33188,
      "old_path": "src/main/java/com/google/devtools/build/lib/remote/merkletree/MerkleTreeComputer.java",
      "new_id": "8cc0e472c09f820b739ca7f5cb626254d0592c3e",
      "new_mode": 33188,
      "new_path": "src/main/java/com/google/devtools/build/lib/remote/merkletree/MerkleTreeComputer.java"
    },
    {
      "type": "modify",
      "old_id": "cb1a74ea4b61d6a4e23054c2d4dd18085c5cd7bc",
      "old_mode": 33188,
      "old_path": "src/test/java/com/google/devtools/build/lib/concurrent/TaskDeduplicatorTest.java",
      "new_id": "7fc268590171e34b7c309be399bff4b8f5616a7b",
      "new_mode": 33188,
      "new_path": "src/test/java/com/google/devtools/build/lib/concurrent/TaskDeduplicatorTest.java"
    }
  ]
}
