This is an automated email from the ASF dual-hosted git repository. captainzmc pushed a commit to branch HDDS-4454 in repository https://gitbox.apache.org/repos/asf/ozone.git
commit 8f8f166615d0df548233690dbf178d4c966d9fe1 Author: hao guo <[email protected]> AuthorDate: Tue Feb 15 19:22:13 2022 +0800 HDDS-6282. Fix BlockDataStreamOutput#doFlushIfNeeded NPE (#3060) --- .../java/org/apache/hadoop/hdds/scm/storage/BlockDataStreamOutput.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/storage/BlockDataStreamOutput.java b/hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/storage/BlockDataStreamOutput.java index 9ac43300f7..8dd9e6b50e 100644 --- a/hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/storage/BlockDataStreamOutput.java +++ b/hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/storage/BlockDataStreamOutput.java @@ -318,7 +318,8 @@ public class BlockDataStreamOutput implements ByteBufferStreamOutput { // the bufferFull condition in async write path. long streamWindow = config.getStreamWindowSize() / config .getDataStreamMinPacketSize(); - if (!bufferList.isEmpty() && bufferList.size() % boundary == 0) { + if (!bufferList.isEmpty() && bufferList.size() % boundary == 0 && + buffersForPutBlock != null && !buffersForPutBlock.isEmpty()) { updateFlushLength(); executePutBlock(false, false); } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
