wu-sheng commented on a change in pull request #3170: Support upgrade backend
w/o rebooting agents
URL: https://github.com/apache/skywalking/pull/3170#discussion_r308552894
##########
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
##########
@@ -87,6 +92,13 @@ public boolean parse(BufferData<UpstreamSegment>
bufferData, SegmentSource sourc
}
SegmentObject segmentObject = bufferData.getV2Segment();
+ // Recheck in case that the segment comes from file buffer
+ final int serviceInstanceId = segmentObject.getServiceInstanceId();
+ if (serviceInstanceInventoryCache.get(serviceInstanceId) == null) {
+ logger.warn("Cannot recognize service instance id [{}] from
cache, segment will be ignored", serviceInstanceId);
+ return false;
Review comment:
If you want to ignore, you should return `true`. Check
`DataStreamReader#read`
----------------------------------------------------------------
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