dcapwell commented on code in PR #3836: URL: https://github.com/apache/cassandra/pull/3836#discussion_r1931279124
########## test/distributed/org/apache/cassandra/distributed/impl/AbstractCluster.java: ########## @@ -1118,9 +1102,29 @@ private void uncaughtException(Thread thread, Throwable error) return; InstanceClassLoader cl = (InstanceClassLoader) thread.getContextClassLoader(); - BiPredicate<Integer, Throwable> ignore = ignoreUncaughtThrowable; I instance = get(cl.getInstanceId()); - if ((ignore == null || !ignore.test(cl.getInstanceId(), error)) && instance != null && !instance.isShutdown()) + try + { + instance.uncaughtException(thread, error); + } + catch (Throwable t) + { + // mixing ClassLoaders so can't use normal instanceOf check + if (AssertionUtils.isInstanceof(InstanceKiller.InstanceShutdown.class).matches(Throwables.getRootCause(t))) + { + // The exception was handled by JVMStabilityInspector + return; Review Comment: throwing no longer helps as much as `org.apache.cassandra.concurrent.ExecutionFailure#handle` will swallow the exception, this wasn't true in the 4.0 code base where the original logic was put in. When `InstanceKiller.InstanceShutdown` was added throwing would cause the full thread to get unwound and all pending logic aborted... `ExecutionFailure#handle` kinda invalidates that assumption so rethrowing no longer helps as much and seems to cause confusion. -- 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: pr-unsubscr...@cassandra.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org For additional commands, e-mail: pr-h...@cassandra.apache.org