Skip to content

fix(storage): handle write_handle-only responses while awaiting flush ack in BidiUploadState - #14775

Draft
nidhiii-27 wants to merge 1 commit into
mainfrom
fix-bidi-flush-persisted-size
Draft

nidhiii-27 wants to merge 1 commit into
mainfrom
fix-bidi-flush-persisted-size

Conversation

@nidhiii-27

Copy link
Copy Markdown
Contributor

Allow AppendableUploadState.onResponse to update writeHandle and return early when an intermediate BidiWriteObjectResponse carries only write_handle without persisted_size or resource, preventing IllegalStateException during flush/awaitAck.

[Generated-by: AI]

… ack in BidiUploadState

Allow AppendableUploadState.onResponse to update writeHandle and return early when an intermediate BidiWriteObjectResponse carries only write_handle without persisted_size or resource, preventing IllegalStateException during flush/awaitAck.

[Generated-by: AI]

@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 updates the AppendableUploadState in BidiUploadState.java to return null when a response contains a write handle but lacks a persisted size or resource, provided the state is not in a takeover phase. It also adds corresponding unit tests in BidiUploadTest.java to verify this behavior, including handling intermediate write handles during flushes. I have no feedback to provide as there are no review comments.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant