zifeihan commented on a change in pull request #6715:
URL: https://github.com/apache/skywalking/pull/6715#discussion_r612100335
##########
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:
done.
##########
File path:
apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/trace/TraceSegment.java
##########
@@ -39,13 +39,13 @@
private String traceSegmentId;
/**
- * The refs of parent trace segments, except the primary one. For most RPC
call, {@link #refs} contains only one
+ * The refs of parent trace segments, except the primary one. For most RPC
call, {@link #traceSegmentRef} contains only one
* element, but if this segment is a start span of batch process, the
segment faces multi parents, at this moment,
- * we use this {@code #refs} to link them.
+ * we only related the first parent TraceSegment.
* <p>
* This field will not be serialized. Keeping this field is only for quick
accessing.
*/
- private List<TraceSegmentRef> refs;
+ private TraceSegmentRef traceSegmentRef;
Review comment:
fixed.
##########
File path:
apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/trace/TraceSegment.java
##########
@@ -39,13 +39,13 @@
private String traceSegmentId;
/**
- * The refs of parent trace segments, except the primary one. For most RPC
call, {@link #refs} contains only one
+ * The refs of parent trace segments, except the primary one. For most RPC
call, {@link #traceSegmentRef} contains only one
* element, but if this segment is a start span of batch process, the
segment faces multi parents, at this moment,
- * we use this {@code #refs} to link them.
+ * we only related the first parent TraceSegment.
Review comment:
done
--
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]