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

fix: multiplexed session metrics were not included in refactor move #3088

Merged
merged 1 commit into from
May 3, 2024

Conversation

olavloite
Copy link
Collaborator

The metrics for multiplexed sessions were not included in the refactoring that moved multiplexed sessions out of the session pool. This change re-adds those metrics based on the new client for multiplexed sessions.

The metrics for multiplexed sessions were not included in the
refactoring that moved multiplexed sessions out of the session pool.
This change re-adds those metrics based on the new client for
multiplexed sessions.
@olavloite olavloite requested a review from a team as a code owner May 3, 2024 10:34
@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: spanner Issues related to the googleapis/java-spanner API. labels May 3, 2024
@@ -3143,7 +3153,7 @@ boolean isValid() {

/**
* Returns a multiplexed session. The method fallbacks to a regular session if {@link
* SessionPoolOptions#useMultiplexedSession} is not set.
* SessionPoolOptions#getUseMultiplexedSession} is not set.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This reference was wrong, and showed up as a warning in IntelliJ

@@ -68,7 +68,6 @@
import com.google.common.base.Function;
import com.google.common.base.MoreObjects;
import com.google.common.base.Preconditions;
import com.google.common.base.Supplier;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is not directly related to this change, but we should start to replace the use of com.google.common.base.Supplier with java.util.function.Supplier.

@@ -555,28 +551,6 @@ public void clearRequests() {
mockSpanner.clearRequests();
}

@Test
public void testCounter() throws InterruptedException {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This test was committed in a previous PR by accident. It was only intended as a test to verify that increasing an AtomicInteger does not introduce any noticeable lock contention.

@olavloite olavloite requested a review from rahul2393 May 3, 2024 10:37
@olavloite olavloite merged commit f3589c4 into main May 3, 2024
34 checks passed
@olavloite olavloite deleted the multiplexed-session-metrics branch May 3, 2024 11:38
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: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants