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 2018/08/29 13:51:46 UTC

[GitHub] ascrutae commented on a change in pull request #1605: fix bug: memory leak caused by using unique instances of HystrixCon…

ascrutae commented on a change in pull request #1605: fix bug: memory leak caused by using unique instances of HystrixCon…
URL: https://github.com/apache/incubator-skywalking/pull/1605#discussion_r213685227
 
 

 ##########
 File path: apm-sniffer/apm-sdk-plugin/hystrix-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/hystrix/v1/HystrixConcurrencyStrategyInterceptor.java
 ##########
 @@ -20,12 +20,18 @@
 package org.apache.skywalking.apm.plugin.hystrix.v1;
 
 import com.netflix.hystrix.strategy.concurrency.HystrixConcurrencyStrategy;
-import java.lang.reflect.Method;
+
 import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedInstance;
 import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceMethodsAroundInterceptor;
 import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.MethodInterceptResult;
 
+import java.lang.reflect.Method;
+import java.util.concurrent.atomic.AtomicReference;
+
 public class HystrixConcurrencyStrategyInterceptor implements InstanceMethodsAroundInterceptor {
+
+    private final AtomicReference<SWHystrixConcurrencyStrategyWrapper> wrapper = new AtomicReference<SWHystrixConcurrencyStrategyWrapper>();
 
 Review comment:
   This filed should store in `EnhancedInstance` object , Not in interceptor object.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


With regards,
Apache Git Services