You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2021/11/12 17:00:35 UTC

[GitHub] [ozone] captainzmc commented on a change in pull request #2835: HDDS-5946. [Ozone-Streaming] The 'Cannot allocate Memory 'problem occurs in client while test write

captainzmc commented on a change in pull request #2835:
URL: https://github.com/apache/ozone/pull/2835#discussion_r748445689



##########
File path: hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/storage/BlockDataStreamOutput.java
##########
@@ -259,6 +268,19 @@ public void write(ByteBuffer b, int off, int len) throws IOException {
     }
 
     final StreamBuffer buf = new StreamBuffer(b, off, len);
+
+    // Controls the number of buffers on the client.
+    if (futures.size() >= streamWindowSize) {
+      try {
+        futures.poll().get();

Review comment:
       Yeah, if it's full, let's wait for the first one to finish, and then we'll put another buf to the bufferList




-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org