googleapis / java-spanner

Apache License 2.0
64 stars 114 forks source link

feat: add option for cancelling queries when closing client #3276

Closed olavloite closed 2 months ago

olavloite commented 2 months ago

Adds the possibility to keep track of all running queries and cancel these when the client is closed. This option is currently only used for queries that are started by BatchReadOnlyTransactions, as these do not use pooled sessions. Queries that use pooled sessions are automatically cancelled when the client is closed, because the sessions are deleted.