)]}'
{
  "commit": "bf57821668772aacd99ea315406fc574f7cfc21b",
  "tree": "68565e0f809cfbcecf54e7687b0aed9d09a419e2",
  "parents": [
    "b6a4b1647facce2d6200f07bed31d347f9c85e5c"
  ],
  "author": {
    "name": "bazel.build machine account",
    "email": "ci.bazel@gmail.com",
    "time": "Thu Oct 29 22:49:04 2026 +0000"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Thu Oct 29 22:49:04 2026 +0000"
  },
  "message": "[10.0.0] Write repository mappings as raw bytes (#31800) (#31887)\n\nWrite repository names directly to the output stream in\n`RepoMappingManifestAction.writeEntry` using\n`StringUnsafe.getInternalStringBytes`. Repository names are ASCII, so\nthe output remains ISO-8859-1 and no longer needs `Formatter` or a\ncharacter encoder. Collect and sort relevant entries in one list,\nretaining the per-map cache for expanded manifests and the existing\ncompact grouping. I/O errors propagate to the caller.\n\nLocal file writes and direct disk-cache transfers already provide\n`BufferedOutputStream`. For streamed uploads, add an 8 KiB buffer before\nthe shared pipe in `DeterministicWriterInputStream`, allocated on the\nfirst read. This batches raw writes before they take the pipe lock.\nDigest generation and direct `transferTo` still bypass the pipe. Update\nthe blocked-writer test to flush at its synchronization points.\n\nThe writer-and-SHA-256 benchmark on 32,800 expanded rows took 3.49 ms\nand allocated 54 KB, versus 5.05 ms and 114 KB with direct appends. For\ncompact manifests of 1,025 to 32,800 rows, it was 16–24% faster and\nallocated 9–33% less than direct appends.\n\nA follow-up production-writer-and-`Chunker` benchmark on 32,800 expanded\nrows took 21.227 ms with the new buffer, versus 25.668 ms with raw\nwrites to the unbuffered pipe and 22.475 ms with appends. With Zstandard\nthe respective times were 28.243, 33.706 and 29.722 ms. At 1,025 compact\nrows, uncompressed times were 1.041, 1.055 and 1.519 ms. Each variant\nused three fresh JDK 25 JVMs; uncompressed bytes and digests matched,\nincluding after Zstandard round trips. These are component measurements,\nexcluding network RPCs.\n\nCompact mapping manifests are around 30x smaller for us, but we still\nsee an improvement writing them.\n\nValidation:\n`//src/test/java/com/google/devtools/build/lib/util:DeterministicWriterTest`\npasses all nine cases on this PR. The previous upstream commit passed\nall eight `RunfilesRepoMappingManifestTest` cases. The source change\npassed 42 adapter, manifest, remote file-write and chunker cases on\nBazel 9.4.\n\nCloses #31800\n\n\nCOPYBARA_INTEGRATE_REVIEW\u003dhttps://github.com/bazelbuild/bazel/pull/31800\nfrom dzbarsky:codex/bazel-pr124-upstream\na0d243c6c79640f399360f71022ed1d1a43237da\nPiperOrigin-RevId: 1003152353\nChange-Id: Iaf7681e803b6b10088be598e1a3400bd597b52fc\n\nCommit\nhttps://github.com/bazelbuild/bazel/commit/d6c675702ba41b3295b2144d1a7a75ca53cf66c0\n\nCo-authored-by: David Zbarsky \u003cdzbarsky@gmail.com\u003e\nCo-authored-by: Ian (Hee) Cha \u003cheec@google.com\u003e",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "d734524d6eb666ccab055a82a0c5913ee0d36a54",
      "old_mode": 33188,
      "old_path": "src/main/java/com/google/devtools/build/lib/analysis/BUILD",
      "new_id": "a0170756813e6e214ee0b6604b90076390fbb5a8",
      "new_mode": 33188,
      "new_path": "src/main/java/com/google/devtools/build/lib/analysis/BUILD"
    },
    {
      "type": "modify",
      "old_id": "2ed7d7b7e64a1d1248d0fe32f85a5031adebb084",
      "old_mode": 33188,
      "old_path": "src/main/java/com/google/devtools/build/lib/analysis/RepoMappingManifestAction.java",
      "new_id": "a13b278f63ec56cc9b546aff7ae3383c9c3d67e6",
      "new_mode": 33188,
      "new_path": "src/main/java/com/google/devtools/build/lib/analysis/RepoMappingManifestAction.java"
    },
    {
      "type": "modify",
      "old_id": "0f175858d54961c8986fcc72174e2014da6203c2",
      "old_mode": 33188,
      "old_path": "src/main/java/com/google/devtools/build/lib/util/DeterministicWriterInputStream.java",
      "new_id": "a64dc55be97dbb849cd590ad5cc4cbe47edce85c",
      "new_mode": 33188,
      "new_path": "src/main/java/com/google/devtools/build/lib/util/DeterministicWriterInputStream.java"
    },
    {
      "type": "modify",
      "old_id": "ce177e597ad48367394c0845a146642be8690dad",
      "old_mode": 33188,
      "old_path": "src/test/java/com/google/devtools/build/lib/util/DeterministicWriterTest.java",
      "new_id": "e13bce89511317abe519b8ca7bf24b482354b78f",
      "new_mode": 33188,
      "new_path": "src/test/java/com/google/devtools/build/lib/util/DeterministicWriterTest.java"
    }
  ]
}
