Skip to content

chore: unflake asyncTransactionManagerWaitsUntilAsyncBatchUpdateHasFinished #3258

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

Merged
merged 1 commit into from
Aug 8, 2024

Conversation

olavloite
Copy link
Collaborator

Fixes #3241

@olavloite olavloite requested a review from a team as a code owner August 7, 2024 13:54
@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 Aug 7, 2024
BatchCreateSessionsRequest.class,
ExecuteBatchDmlRequest.class,
CommitRequest.class);
assertThat(mockSpanner.getRequestTypes()).containsAtLeastElementsIn(expectedRequests);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AsyncTransactionManager does not support multiplexed sessions yet. Just curious to understand at what condition this flakiness is occurring?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although read/write transactions do not support multiplexed sessions, we do pre-emptively create a multiplexed session asynchronously when a client is created with multiplexed sessions enabled. We do this to try to avoid that the first query that can use multiplexed sessions has to wait for it. That again means that these tests might or might not see a multiplexed session being created (random, because the request is executed async). As the multiplexed session is not used here, we just choose to ignore it in the test, as it is irrelevant.

@olavloite olavloite merged commit 1eb5a31 into main Aug 8, 2024
33 checks passed
@olavloite olavloite deleted the issue-3241 branch August 8, 2024 06:54
lqiu96 pushed a commit that referenced this pull request Sep 10, 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.

AsyncTransactionManagerTest.asyncTransactionManagerWaitsUntilAsyncBatchUpdateHasFinished is flaky
2 participants