Skip to content

fix(storage): copy retained read metadata and read handle out of response buffers - #15097

Draft
Dhriti07 wants to merge 1 commit into
mainfrom
storage-read-metadata-copy
Draft

Dhriti07 wants to merge 1 commit into
mainfrom
storage-read-metadata-copy

Conversation

@Dhriti07

Copy link
Copy Markdown
Contributor

Object metadata and the read handle kept from read responses are now copied.

…onse buffers

Object metadata and the read handle kept from read responses are now copied.

@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 addresses an issue where metadata and read handles from gRPC responses were being shared or mutated across sessions. It introduces a copyOf utility method in GrpcUtils to perform deep copies of protobuf messages by serializing and deserializing them. This utility is then used in GapicUnbufferedReadableByteChannel and ObjectReadSessionStream when setting metadata and read handles. Additionally, a new integration test blobInfo_unchangedAfterReadsFromAnotherSession has been added to verify that BlobInfo remains unchanged during concurrent or subsequent sessions. I have no feedback to provide as there are no review comments to evaluate.

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