You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by "GuoHaoZai (via GitHub)" <gi...@apache.org> on 2025/04/24 07:56:22 UTC

Re: [PR] Fix Conflicts apm-jdk-threadpool-plugin conflicts with apm-jdk-forkjoinpool-plugin [skywalking-java]

GuoHaoZai commented on code in PR #753:
URL: https://github.com/apache/skywalking-java/pull/753#discussion_r2057781759


##########
apm-sniffer/bootstrap-plugins/jdk-threadpool-plugin/src/main/java/org/apache/skywalking/apm/plugin/AbstractThreadingPoolInterceptor.java:
##########
@@ -71,6 +72,8 @@ private boolean notToEnhance(Object[] allArguments) {
         Object argument = allArguments[0];
 
         // Avoid duplicate enhancement, such as the case where it has already been enhanced by RunnableWrapper or CallableWrapper with toolkit.
-        return argument instanceof EnhancedInstance && ((EnhancedInstance) argument).getSkyWalkingDynamicField() instanceof ContextSnapshot;
+        return argument instanceof EnhancedInstance
+                && ((EnhancedInstance) argument).getSkyWalkingDynamicField() instanceof ContextSnapshot
+                && !(argument instanceof ForkJoinTask);

Review Comment:
   yes.
   Because forkjoinpool  plugin enhanced is not work in threadpool plugin. 
   Also threadpool plugin enhanced is not work in forkjoinpool  plugin.



-- 
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: notifications-unsubscribe@skywalking.apache.org

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