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



##########
File path: 
apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/trace/AbstractTracingSpan.java
##########
@@ -301,6 +302,12 @@ public void ref(TraceSegmentRef ref) {
         if (refs == null) {
             refs = new LinkedList<>();
         }
+        /*
+         * Provide the OOM protection if the entry span hosts too many 
references.
+         */
+        if (refs.size() >= Config.Agent.TRACE_SEGMENT_REF_LIMIT_PER_SPAN) {

Review comment:
       ```suggestion
           if (refs.size() == Config.Agent.TRACE_SEGMENT_REF_LIMIT_PER_SPAN) {
   ```
   What is the case should be `>`? Unless there is a bug here, or faces face 
condition, but actually race condition is a bug




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