GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||
GeezerVison is showing github.com — refactor(spanner): unify streaming read and query startup by olavloite · Pull Request #14776 · googleapis/google-cloud-java Conversation
Contributor
Streaming SQL queries and streaming key-value reads previously duplicated the same request setup and stream startup logic in two separate code paths. This change unifies both operations behind a single internal request abstraction so that option configuration, retry settings, and stream lifecycle handling are maintained in one place. As part of unifying stream startup, this also hardens how inlined BeginTransaction state is tracked across the stream lifecycle:
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Code ReviewThis pull request introduces a new package-private abstraction
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsStreaming SQL queries and streaming key-value reads previously duplicated the same request setup and stream startup logic in two separate code paths. This change unifies both operations behind a single internal request abstraction so that option configuration, retry settings, and stream lifecycle handling are maintained in one place. As part of unifying stream startup, this also hardens how inlined BeginTransaction state is tracked across the stream lifecycle: - Records whether a request carries an inlined BeginTransaction on the request itself and passes it to the stream iterator at construction time rather than when the gRPC call is attached, keeping the state available across retry backoffs while ensuring it is cleared once the iterator is closed. - Ensures that if starting an inlined-begin stream fails before the stream can be consumed, the pending transaction ID future is failed immediately with a consistent exception so concurrent callers on the same transaction do not wait for a timeout.
olavloite
force-pushed
the
spanner-unify-query-and-read-startup
branch
from
8249a04 to
393f3b2
Compare
olavloite
commented
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. All options that are common for Read and Query have been moved into ReadOrQueryRequest, and are therefore removed here to reduce code duplication.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Code ReviewThis pull request introduces a new package-private abstraction,
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsUh oh!
There was an error while loading. Please reload this page.
sakthivelmanii
approved these changes
Uh oh!
There was an error while loading. Please reload this page.
sakthivelmanii
pushed a commit
that referenced
this pull request
…14885) Merging PR #14770 and PR #14776 concurrently broke the build on main. One PR added unit tests that configure mock streams using a two-argument setCall method to indicate whether a transaction is inlined, while the other PR removed that parameter because production code now configures this during stream construction. This change restores the two-argument setCall method for testing and keeps the inlined transaction state configurable during test setup.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reviewers+1 more reviewerUh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedLabels
None yet
ProjectsMilestoneNo milestoneDevelopmentSuccessfully merging this pull request may close these issues. Uh oh!
There was an error while loading. Please reload this page. Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later. | |||||||||||||
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |