wu-sheng commented on a change in pull request #1862: Fixed the collector OOM 
bug.
URL: 
https://github.com/apache/incubator-skywalking/pull/1862#discussion_r230074143
 
 

 ##########
 File path: 
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/remote/client/GRPCRemoteClient.java
 ##########
 @@ -66,11 +66,13 @@ public GRPCRemoteClient(StreamDataClassGetter 
streamDataClassGetter, RemoteInsta
         }
 
         @Override public void consume(List<RemoteMessage> remoteMessages) {
-            StreamObserver<RemoteMessage> streamObserver = 
createStreamObserver();
+            StreamStatus status = new StreamStatus(false);
+            StreamObserver<RemoteMessage> streamObserver = 
createStreamObserver(status);
             for (RemoteMessage remoteMessage : remoteMessages) {
                 streamObserver.onNext(remoteMessage);
             }
             streamObserver.onCompleted();
+            status.wait4Finish(10);
 
 Review comment:
   Look like max sleep time is 10 milliseconds? Why could this avoid OOM?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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

Reply via email to