InternalConnectorRegistry.executor uses non-daemon threads #617
Labels
priority: p1
Important issue which blocks shipping the next release. Will be fixed prior to next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Bug Description
For InternalConnectorRegistry.executor, it uses non-daemon threads which prevents normal shutdown of our application. It is very easy to reproduce this for us - whenever we have a command that connects to AlloyDB it does not terminate when the main function exits, and we instead need to put
System.exit(0)
orConnectorRegistry.shutdown()
at the end of the main function.It seems like even error on the main thread does not terminate the process now with the connector, so we have batch jobs that fail and linger in this zombie state.
In order to create daemon threads, creation of executors should be changed to something like
Many thanks for looking into this
Example code (or command)
Stacktrace
Steps to reproduce?
...
Environment
Additional Details
No response
The text was updated successfully, but these errors were encountered: