-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add gRPC-GCP channel pool as an option (#1227)
* add grpc-gcp extensions * remove local files * update read apiconfig * update read apiconfig * Add custom pool size for GCP extension * add one more entry in aip config file * change gcp package name * Adjust grpc-gcp package name and group * Set grpc-gcp low streams watermark to 1 This allows sessions to be spread across channels when the Spanner client starts up. * Add gRPC-GCP extension options to SpannerOptions * feat: add gRPC-GCP channel pool as an option This enables a user to opt-in for using the gRPC-GCP extension channel pool and configure its options. * Addressed comments. * Fixed linting issues. * Add integration test with enabled gRPC-GCP extension * Remake gRPC-GCP extension related SpannerOptions * Add ChannelUsageTest Co-authored-by: Zhenli(Jenny) Jiang <jennyjiang@google.com> Co-authored-by: Knut Olav Løite <koloite@gmail.com>
- Loading branch information
1 parent
b2a56c6
commit 1fa95a9
Showing
6 changed files
with
569 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
106 changes: 106 additions & 0 deletions
106
...-cloud-spanner/src/main/resources/com/google/cloud/spanner/spi/v1/grpc-gcp-apiconfig.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
{ | ||
"channelPool": { | ||
"maxSize": 3, | ||
"maxConcurrentStreamsLowWatermark": 0 | ||
}, | ||
"method": [ | ||
{ | ||
"name": ["google.spanner.v1.Spanner/CreateSession"], | ||
"affinity" : { | ||
"command": "BIND", | ||
"affinityKey": "name" | ||
} | ||
}, | ||
{ | ||
"name": ["google.spanner.v1.Spanner/BatchCreateSessions"], | ||
"affinity" : { | ||
"command": "BIND", | ||
"affinityKey": "session.name" | ||
} | ||
}, | ||
{ | ||
"name": ["google.spanner.v1.Spanner/GetSession"], | ||
"affinity": { | ||
"command": "BOUND", | ||
"affinityKey": "name" | ||
} | ||
}, | ||
{ | ||
"name": ["google.spanner.v1.Spanner/DeleteSession"], | ||
"affinity": { | ||
"command": "UNBIND", | ||
"affinityKey": "name" | ||
} | ||
}, | ||
{ | ||
"name": ["google.spanner.v1.Spanner/ExecuteSql"], | ||
"affinity": { | ||
"command": "BOUND", | ||
"affinityKey": "session" | ||
} | ||
}, | ||
{ | ||
"name": ["google.spanner.v1.Spanner/ExecuteBatchDml"], | ||
"affinity": { | ||
"command": "BOUND", | ||
"affinityKey": "session" | ||
} | ||
}, | ||
{ | ||
"name": ["google.spanner.v1.Spanner/ExecuteStreamingSql"], | ||
"affinity": { | ||
"command": "BOUND", | ||
"affinityKey": "session" | ||
} | ||
}, | ||
{ | ||
"name": ["google.spanner.v1.Spanner/Read"], | ||
"affinity": { | ||
"command": "BOUND", | ||
"affinityKey": "session" | ||
} | ||
}, | ||
{ | ||
"name": ["google.spanner.v1.Spanner/StreamingRead"], | ||
"affinity": { | ||
"command": "BOUND", | ||
"affinityKey": "session" | ||
} | ||
}, | ||
{ | ||
"name": ["google.spanner.v1.Spanner/BeginTransaction"], | ||
"affinity": { | ||
"command": "BOUND", | ||
"affinityKey": "session" | ||
} | ||
}, | ||
{ | ||
"name": ["google.spanner.v1.Spanner/Commit"], | ||
"affinity": { | ||
"command": "BOUND", | ||
"affinityKey": "session" | ||
} | ||
}, | ||
{ | ||
"name": ["google.spanner.v1.Spanner/PartitionRead"], | ||
"affinity": { | ||
"command": "BOUND", | ||
"affinityKey": "session" | ||
} | ||
}, | ||
{ | ||
"name": ["google.spanner.v1.Spanner/PartitionQuery"], | ||
"affinity": { | ||
"command": "BOUND", | ||
"affinityKey": "session" | ||
} | ||
}, | ||
{ | ||
"name": ["google.spanner.v1.Spanner/Rollback"], | ||
"affinity": { | ||
"command": "BOUND", | ||
"affinityKey": "session" | ||
} | ||
} | ||
] | ||
} |
Oops, something went wrong.