wu-sheng commented on a change in pull request #2828: Optimize
SegmentParseV2::parse code logic
URL: https://github.com/apache/skywalking/pull/2828#discussion_r291805523
##########
File path:
oap-server/server-receiver-plugin/skywalking-trace-receiver-plugin/src/main/java/org/apache/skywalking/oap/server/receiver/trace/provider/parser/SegmentParseV2.java
##########
@@ -82,10 +82,11 @@ public boolean parse(BufferData<UpstreamSegment>
bufferData, SegmentSource sourc
List<UniqueId> traceIds = upstreamSegment.getGlobalTraceIdsList();
+ SegmentObject segmentObject = parseBinarySegment(upstreamSegment);
Review comment:
`SegmentParseV2#parse` will be invoked multiple times, due to
`SegmentParseV2#Producer#call` triggered by `DataStreamReader#L159-L161`. So,
the `#parseBinarySegment` should be called only when `bufferData.getV2Segment()
== null` from my perspective
----------------------------------------------------------------
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]
With regards,
Apache Git Services