Skip to content

feat(storage): add blobReadSession overload that takes a fast open read - #14876

Draft
Dhriti07 wants to merge 1 commit into
fast-open/06-fast-open-through-wrappersfrom
fast-open/07-public-api
Draft

Dhriti07 wants to merge 1 commit into
fast-open/06-fast-open-through-wrappersfrom
fast-open/07-public-api

Conversation

@Dhriti07

Copy link
Copy Markdown
Contributor

7/n fast open BiDi reads

Storage.blobReadSession(BlobId, ReadProjectionConfig, BlobSourceOption...) sends the read described by the config in the same request that opens the session. The first readAs with an equal config is given that read, saving the round trip a separate first read would take. Only asFutureBytes, asFutureByteString and asChannel configs are accepted, and a null config only opens the session.

This is additive: blobReadSession(BlobId, BlobSourceOption...) is unchanged. OtelStorageDecorator passes the config through, so fast open also works with OpenTelemetry tracing enabled.

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

Copy link
Copy Markdown
Contributor

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 introduces a new overload for the blobReadSession method in the Storage interface and its implementations, enabling a "fast open" feature that allows a read operation to be sent in the same request that opens the session. This optimization saves a round trip. The changes include validation logic to ensure only stream read projections are accepted, as well as comprehensive integration tests to verify the new functionality, error handling, and tracing. I have no feedback to provide as the implementation is clean and well-tested.

@Dhriti07
Dhriti07 force-pushed the fast-open/06-fast-open-through-wrappers branch from 3108ca7 to dedf4d1 Compare October 31, 2026 18:48
@Dhriti07
Dhriti07 force-pushed the fast-open/07-public-api branch from 7c4262e to 63fb3c4 Compare October 31, 2026 18:48
Seventh step of fast open BiDi reads (go/fast-open-bidi-read, b/552263062).

Storage.blobReadSession(BlobId, ReadProjectionConfig, BlobSourceOption...)
sends the read described by the config in the same request that opens the
session. The first readAs with an equal config is given that read, saving the
round trip a separate first read would take. Only asFutureBytes,
asFutureByteString and asChannel configs are accepted, and a null config only
opens the session.

This is additive: blobReadSession(BlobId, BlobSourceOption...) is unchanged.
OtelStorageDecorator passes the config through, so fast open also works with
OpenTelemetry tracing enabled, and a fast open read that fails is recorded as
an error on its readAs span.
@Dhriti07
Dhriti07 force-pushed the fast-open/07-public-api branch from 63fb3c4 to d14e2a9 Compare November 1, 2026 12:01
@Dhriti07
Dhriti07 force-pushed the fast-open/06-fast-open-through-wrappers branch from dedf4d1 to 49d3976 Compare November 1, 2026 12:01

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant