Skip to content

Commit 0bbb1a1

Browse files
docs: add background info for session pool (#2498)
* docs: add background info for session pool Adds additional technical background information on how the session and and channel pools work. * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore: add code formatting --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent da47b0a commit 0bbb1a1

File tree

3 files changed

+301
-0
lines changed

3 files changed

+301
-0
lines changed

.readme-partials.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,15 @@ custom_content: |
4141
4242
In [DatabaseSelect.java](https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-examples/src/main/java/com/google/cloud/examples/spanner/snippets/DatabaseSelect.java) we put together all the code shown above in a single program.
4343
44+
## Session Pool
45+
46+
The Cloud Spanner client maintains a session pool, as sessions are expensive to create and are
47+
intended to be long-lived. The client automatically takes a session from the pool and uses this
48+
executing queries and transactions.
49+
See [Session Pool and Channel Pool Configuration](session-and-channel-pool-configuration.md)
50+
for in-depth background information about sessions and gRPC channels and how these are handled in
51+
the Cloud Spanner Java client.
52+
4453
## OpenCensus Metrics
4554
4655
Cloud Spanner client supports [Opencensus Metrics](https://opencensus.io/stats/),

README.md

+9
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,15 @@ try {
147147

148148
In [DatabaseSelect.java](https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-examples/src/main/java/com/google/cloud/examples/spanner/snippets/DatabaseSelect.java) we put together all the code shown above in a single program.
149149

150+
## Session Pool
151+
152+
The Cloud Spanner client maintains a session pool, as sessions are expensive to create and are
153+
intended to be long-lived. The client automatically takes a session from the pool and uses this
154+
executing queries and transactions.
155+
See [Session Pool and Channel Pool Configuration](session-and-channel-pool-configuration.md)
156+
for in-depth background information about sessions and gRPC channels and how these are handled in
157+
the Cloud Spanner Java client.
158+
150159
## OpenCensus Metrics
151160

152161
Cloud Spanner client supports [Opencensus Metrics](https://opencensus.io/stats/),

0 commit comments

Comments
 (0)