Skip to content

Commit

Permalink
docs: add background info for session pool (#2498)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
olavloite and gcf-owl-bot[bot] committed Jun 28, 2023
1 parent da47b0a commit 0bbb1a1
Show file tree
Hide file tree
Showing 3 changed files with 301 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .readme-partials.yaml
Expand Up @@ -41,6 +41,15 @@ custom_content: |
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.
## Session Pool
The Cloud Spanner client maintains a session pool, as sessions are expensive to create and are
intended to be long-lived. The client automatically takes a session from the pool and uses this
executing queries and transactions.
See [Session Pool and Channel Pool Configuration](session-and-channel-pool-configuration.md)
for in-depth background information about sessions and gRPC channels and how these are handled in
the Cloud Spanner Java client.
## OpenCensus Metrics
Cloud Spanner client supports [Opencensus Metrics](https://opencensus.io/stats/),
Expand Down
9 changes: 9 additions & 0 deletions README.md
Expand Up @@ -147,6 +147,15 @@ try {

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.

## Session Pool

The Cloud Spanner client maintains a session pool, as sessions are expensive to create and are
intended to be long-lived. The client automatically takes a session from the pool and uses this
executing queries and transactions.
See [Session Pool and Channel Pool Configuration](session-and-channel-pool-configuration.md)
for in-depth background information about sessions and gRPC channels and how these are handled in
the Cloud Spanner Java client.

## OpenCensus Metrics

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

0 comments on commit 0bbb1a1

Please sign in to comment.