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 2019/09/26 14:22:15 UTC
[GitHub] [skywalking] yangyshdan opened a new issue #3531: Possible segment
ref data loss in the zipkin receiver plugin
yangyshdan opened a new issue #3531: Possible segment ref data loss in the zipkin receiver plugin
URL: https://github.com/apache/skywalking/issues/3531
Please answer these questions before submitting your issue.
- Why do you submit this issue?
Bug
___
### Bug
- Which version of SkyWalking, OS and JRE?
JRE
- Which company or project?
School research project
- What happen?
If possible, provide a way for reproducing the error. e.g. demo application, component version.
In the code of SegmentBuilder.java in the initSpan function, there is a piece of code which is listed below.
```
switch (kind) {
case CLIENT:
spanBuilder.setSpanType(SpanType.Exit);
String peer = getPeer(parentSpan, span);
if (peer != null) {
spanBuilder.setPeer(peer);
}
clientSideSpan = new ClientSideSpan(span, spanBuilder);
clientPartSpan.put(span.id(), clientSideSpan);
break;
case SERVER:
spanBuilder.setSpanType(SpanType.Entry);
this.buildRef(spanBuilder, span, parentSegmentSpan, parentSpan);
break;
```
Notice that ***clientPartSpan.put(span.id(), clientSideSpan);*** will set the client span in cache so that when server span arrived, it will fetch client span and build the segment reference.
However, the spans' arriving order is totally random. We can not gurantee that client span will arrive before server span. If server span arrives before client span, the segement ref building process will fail.
This happens several time in my local environment.
----------------------------------------------------------------
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
With regards,
Apache Git Services