laxmanmamididd commented on code in PR #7363:
URL: https://github.com/apache/datafusion-comet/pull/7363#discussion_r4475644700
##########
spark/src/main/java/org/apache/comet/cloud/s3/CometS3CredentialDispatcher.java:
##########
@@ -198,20 +231,30 @@ private static CometS3CredentialProvider
instantiate(String providerClassName) {
/** Visible for tests; otherwise invoked from the JVM shutdown hook. */
static void closeAll() {
for (RegisteredProvider registered : INSTANCES.values()) {
- try {
- registered.provider.close();
- } catch (Throwable t) {
- LOG.warn(
- "Exception from {} (dispatchKey={}).close() during shutdown",
- registered.key.providerClassName,
- registered.key.dispatchKey,
- t);
- }
+ close(registered, "during shutdown");
Review Comment:
Fixed in #7464 (40963cfe6). `closeAll` claims an entry with
`refs.getAndSet(RETIRED)` and closes it only if it wasn't already retired, so
it and a concurrent last release can't both close it.
`shutdownAndAConcurrentLastReleaseCloseOnce` reproduces your latch case and
checks for one close.
--
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]