If transform throw exception, the stream observer won't call the onCompleted method, then the stream observer will wait it finish until the timeout. (#3163)

This commit is contained in:
彭勇升 pengys 2019-07-25 08:54:14 +08:00 committed by 吴晟 Wu Sheng
parent 8605f4ccc0
commit 0cf998022d
1 changed files with 5 additions and 4 deletions

View File

@ -113,13 +113,14 @@ public class TraceSegmentServiceClient implements BootService, IConsumer<TraceSe
UpstreamSegment upstreamSegment = segment.transform();
upstreamSegmentStreamObserver.onNext(upstreamSegment);
}
upstreamSegmentStreamObserver.onCompleted();
status.wait4Finish();
segmentUplinkedCounter += data.size();
} catch (Throwable t) {
logger.error(t, "Transform and send UpstreamSegment to collector fail.");
}
upstreamSegmentStreamObserver.onCompleted();
status.wait4Finish();
segmentUplinkedCounter += data.size();
} else {
segmentAbandonedCounter += data.size();
}