amaliujia commented on code in PR #11767:
URL: https://github.com/apache/ozone/pull/11767#discussion_r4409390517


##########
hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/storage/BlockDataStreamOutput.java:
##########
@@ -434,6 +436,17 @@ public void watchForCommit(boolean bufferFull) throws 
IOException {
    */
   public void executePutBlock(boolean close,
       boolean force) throws IOException {
+    executePutBlock(close, force, false);
+  }
+
+  /**
+   * @param close whether putBlock is happening as part of closing the stream
+   * @param force true if no data was written since most recent putBlock and
+   *            either the stream is being closed or the previous putBlock is 
to be synced
+   * @param sync whether the datanodes sync the data and the PutBlock to disk 
before replying;
+   *             it applies only to a PutBlock committed in the middle of the 
stream without Raft
+   */
+  private void executePutBlock(boolean close, boolean force, boolean sync) 
throws IOException {

Review Comment:
   Per my understanding, `force` means just there is no new data since last 
PutBlock, while `sync` means different thing. 
   
   I ended up with ussing `buffersForPutBlock != null` for the places that used 
to be `!force`.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to