Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: support concurrent transactions on a multiplexed session. #3011

Closed
wants to merge 1 commit into from

Conversation

arpan14
Copy link
Collaborator

@arpan14 arpan14 commented Apr 5, 2024

setActive() method within SessionImpl does the below things

  1. Handles nested transaction use-case
  2. Invalidates active transactions - Disabling this will allow multiple transactions per session.
  3. Resets readyTransactionId - The value for readyTransactionId is only set in the prepareReadWriteTransaction method. Otherwise the value anyway remains null.
  4. Sets the span per active transaction - A session no longer can maintain a single span. Hence, we will require to change the way spans are added for multiplexed session. This is doable since for each new RPC, a new span object is created and stored in the local thread context. Instead of storing the span state in SessionImpl, we can fetch the span from context and set it.

For multiplexed session we are disabling #2, #3 and #4 for launching read-only transactions. The functionality of spans/traces for multiplexed session will be tested and added in a separate PR.

@product-auto-label product-auto-label bot added size: s Pull request size is small. api: spanner Issues related to the googleapis/java-spanner API. labels Apr 5, 2024
@arpan14 arpan14 requested a review from olavloite April 5, 2024 17:53
@arpan14
Copy link
Collaborator Author

arpan14 commented Apr 9, 2024

Closing PR in favor of a single PR - #3016 for remainder changes.

@arpan14 arpan14 closed this Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the googleapis/java-spanner API. size: s Pull request size is small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant