imbajin opened a new pull request, #825: URL: https://github.com/apache/hugegraph-toolchain/pull/825
When Hubble closes with an interrupted caller, the async executor drains its work and restores the interrupt before Spring closes the metadata datasource. HikariCP can then stop midway through cleanup after already marking the pool closed, leaving connections or internal executors behind. A repeated `close()` cannot finish that cleanup. Close the metadata pool on one dedicated worker and wait for it to finish before returning. Pending and newly arriving caller interrupts are preserved after cleanup, and concurrent or repeated callers wait for the same shutdown. The production datasource builder uses this implementation; async draining order stays intact. The existing scheduled-metadata regression retains its physical H2 connection assertions and now uses the production datasource factory. Additional regressions hold the real Hikari cleanup at a latch to cover pending interrupts, interrupts during cleanup, concurrent close and repeated close, checking physical connections and owned executors. Validation: native Temurin Java 17; focused datasource/lifecycle/H2 startup tests, the complete Hubble UnitTestSuite, and the same backend unit-test entry point used by CI. Checkstyle passed as part of validation. Restoring the original close behavior makes the new interrupted-close regressions fail. Follows up on the inherited lifecycle issue identified in [#824](https://github.com/apache/hugegraph-toolchain/pull/824#pullrequestreview-5563230198). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
