You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by "belliottsmith (via GitHub)" <gi...@apache.org> on 2025/02/03 19:10:40 UTC

Re: [PR] CASSANDRA-20248: Fixed jvm-dtest issue where InstanceKiller.InstanceShutdown handling was regressed and marked as unhandled [cassandra]

belliottsmith commented on code in PR #3836:
URL: https://github.com/apache/cassandra/pull/3836#discussion_r1939893453


##########
test/distributed/org/apache/cassandra/distributed/impl/AbstractCluster.java:
##########
@@ -332,29 +333,12 @@ private IInvokableInstance newInstance()
             ++generation;
             IClassTransformer transformer = classTransformer == null ? null : classTransformer.initialise();
             ClassLoader classLoader = new InstanceClassLoader(generation, config.num(), version.classpath, sharedClassLoader, sharedClassPredicate, transformer);
-            Consumer<Throwable> stabilityInspector;
-            {
-                try
-                {
-                    Class<?> owner = classLoader.loadClass(JVMStabilityInspector.class.getName());
-                    Method method = owner.getMethod("inspectThrowable", Throwable.class);

Review Comment:
   So why not add just that extra logging in the exception handler we register? This would also be clearer. My problem with the current and prior approach is that we're invoking this all on _another thread_ via a weird self-referential loop. Passing the Cluster through to each instance to only lookup the instance itself again is confusing to me, and unnecessary. 
   
   We can if you like define a static method for this that we mark as requiring stability for API purposes, or if you really want we can jump through some extra hoops to invoke the IInstance methods directly without the indirection via Cluster and additional threads.



-- 
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-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org