Skip to content

Conversation

@bazel-io
Copy link
Member

By using a Piped{Input,Output}Stream pair backed by a virtual thread, uploads of VirtualActionInput no longer have to materialize the full input in memory and thus require less peak heap.

Closes #28259.

PiperOrigin-RevId: 855713407
Change-Id: I3e382fd4da2fe0f2899d5b00d19d718ddce1a54c

Commit 92dad2c

By using a `Piped{Input,Output}Stream` pair backed by a virtual thread, uploads of `VirtualActionInput` no longer have to materialize the full input in memory and thus require less peak heap.

Closes bazelbuild#28259.

PiperOrigin-RevId: 855713407
Change-Id: I3e382fd4da2fe0f2899d5b00d19d718ddce1a54c
@bazel-io bazel-io added the team-Remote-Exec Issues and PRs for the Execution (Remote) team label Jan 20, 2026
@bazel-io bazel-io requested a review from a team as a code owner January 20, 2026 23:00
@bazel-io bazel-io added the awaiting-review PR is awaiting review from an assigned reviewer label Jan 20, 2026
@bazel-io bazel-io requested a review from coeuvre January 20, 2026 23:01
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request effectively addresses the issue of high memory usage during VirtualActionInput uploads by refactoring VirtualActionInputBlob to use PipedInputStream and PipedOutputStream backed by virtual threads. The changes to the RemoteCacheClient.Blob interface, removing its Closeable aspect, are consistently applied across Chunker, RemoteExecutionCache, HttpCacheClient, and InMemoryCacheClient. The updated GrpcCacheClientTest now includes a robust test case that directly verifies the memory optimization, which is a significant improvement. Overall, the changes are well-implemented and achieve the stated goal of reducing peak heap memory.

@iancha1992 iancha1992 enabled auto-merge January 21, 2026 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-review PR is awaiting review from an assigned reviewer team-Remote-Exec Issues and PRs for the Execution (Remote) team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants