You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: java-datastore/google-cloud-datastore/src/main/java/com/google/cloud/datastore/telemetry/DatastoreCloudMonitoringExporter.java
+5-8Lines changed: 5 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -85,12 +85,10 @@ static class CachedMetricsClient {
85
85
}
86
86
87
87
/**
88
-
* Shared cache for {@link MetricServiceClient} instances, keyed by
89
-
* "projectId:databaseId:credentialsHashCode". Sharing a single gRPC channel across exporter
90
-
* instances that target the same project, database, and credentials avoids per-client channel
91
-
* overhead (threads, connections, memory). The credentials hash ensures that clients using
92
-
* different credentials get their own isolated channel. Reference counting is used to safely shut
93
-
* down the client when no longer needed.
88
+
* Shared cache for {@link MetricServiceClient} instances, keyed by "projectId:databaseId".
89
+
* Sharing a single gRPC channel across exporter instances that target the same project and
Copy file name to clipboardExpand all lines: java-datastore/google-cloud-datastore/src/test/java/com/google/cloud/datastore/telemetry/DatastoreCloudMonitoringExporterTest.java
+6-4Lines changed: 6 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -83,7 +83,7 @@ public void setUp() {
83
83
84
84
exporter =
85
85
newDatastoreCloudMonitoringExporter(
86
-
PROJECT_ID + ":" + DATABASE_ID + ":0",
86
+
PROJECT_ID + ":" + DATABASE_ID,
87
87
PROJECT_ID,
88
88
DATABASE_ID,
89
89
fakeMetricServiceClient,
@@ -166,22 +166,24 @@ public void testClientCacheReferenceCounting() {
166
166
EasyMock.expectLastCall(); // Expect shutdown when refCount reaches 0
0 commit comments