wu-sheng commented on a change in pull request #6715:
URL: https://github.com/apache/skywalking/pull/6715#discussion_r611621151



##########
File path: 
apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/trace/AbstractTracingSpan.java
##########
@@ -301,6 +302,13 @@ public void ref(TraceSegmentRef ref) {
         if (refs == null) {
             refs = new LinkedList<>();
         }
+        /*
+         * There maybe an exception in some plugins, which causes the span to 
fail to exit,
+         * which results in the ThreadLocal not being cleaned up, and the refs 
data is increasing.

Review comment:
       ```suggestion
            * Provide the OOM protection if the entry span hosts too many 
references.
   ```
   You should not do coding for bugs. This OOM protection could happen w/o bug, 
such as consuming 1k+ message as a batch, isn't it?




-- 
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:
[email protected]


Reply via email to