ivankelly commented on a change in pull request #1228: Issue #570: Move logic 
of unpersistedbytes to bufferedchannel
URL: https://github.com/apache/bookkeeper/pull/1228#discussion_r172496811
 
 

 ##########
 File path: 
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/BufferedChannel.java
 ##########
 @@ -110,11 +150,15 @@ public long getFileChannelPosition() {
      * @throws IOException if the write or sync operation fails.
      */
     public void flush(boolean shouldForceWrite) throws IOException {
+        flush(shouldForceWrite, false);
+    }
+
+    public void flush(boolean shouldForceWrite, boolean forceMetadata) throws 
IOException {
         synchronized (this) {
 
 Review comment:
   >  fix all the shortcomings of the existing code.
   
   You are adding a new method. I'm asking you not to add to issues that 
already exist.
   
   > It is risky and burdensome to touch critical path (change signatures)
   
   You don't have to change any signatures if you don't want to. Just call 
flush(false), and then forceWrite(true). flush() was just a suggestion as the 
false is redundant there. BufferedChannel should have a simple flush() 
operation that just flushing the buffer to the channel, which is exactly what 
flush(false) does. You don't have to add that though.
   
   

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to