You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2021/05/08 06:42:27 UTC

[GitHub] [skywalking] Ax1an commented on a change in pull request #6913: Fix possible memory leaks in mybatis plugin.

Ax1an commented on a change in pull request #6913:
URL: https://github.com/apache/skywalking/pull/6913#discussion_r628711084



##########
File path: apm-sniffer/optional-plugins/mybatis-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/mybatis/SqlSessionOperationInterceptor.java
##########
@@ -40,7 +41,8 @@ public void beforeMethod(EnhancedInstance objInst, Method method, Object[] allAr
         if (ContextManager.isActive()) {
             lastSpan = ContextManager.activeSpan();
         }
-        if (lastSpan == null || lastSpan.getComponentId() != ComponentsDefine.MYBATIS.getId()) {
+        boolean isMyBatisEntryMethod = !(lastSpan instanceof NoopSpan) && (lastSpan == null || lastSpan.getComponentId() != ComponentsDefine.MYBATIS.getId());

Review comment:
       @wu-sheng Yes, you are right. I don't want to enhance too many overloaded methods to waste resources.




-- 
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.

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