GoogleCloudPlatform / GoogleCloudPlatform/cloud-spanner-r2dbc

Find and close all `SpannerClientLibraryConnectionFactory` on Spring Data context shutdown

Open
#380 0 comments 0 reactions 0 assignees View on GitHub
enhancement P2 V2
Dominant language
Java
Stars
60
Forks
31
PR merge metrics
No merged PRs in 30d

Description

1) Pending outcome of spring-projects/spring-framework#26991, add a listener for `ContextClosedEvent` to find `SpannerClientLibraryConnectionFactory` beans and call `Closeable.close().subscribe()`. Might have to even block to avoid race conditions ("app shut down before sessions are released")

2) Add stronger documentation warnings about having to close custom created Spanner connection factories on context shutdown (to avoid server-side session leaks, as the client library pre-allocates ~200 sessions).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.