zymap commented on code in PR #4044:
URL: https://github.com/apache/bookkeeper/pull/4044#discussion_r1287825488


##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/storage/ldb/KeyValueStorageRocksDB.java:
##########
@@ -540,6 +551,7 @@ public void put(byte[] key, byte[] value) throws 
IOException {
         public void remove(byte[] key) throws IOException {
             try {
                 writeBatch.delete(key);
+                countBatchAndFlushIfNeeded();

Review Comment:
   It won't. The batch should only affect when the action starts to do in the 
rocksdb, we're just pending our operations into the batch to avoid calling the 
real action method multiple times. 
   See here: 
https://github.com/facebook/rocksdb/blob/9a034801cead6421bcf82b506b77e3b2251f1edb/include/rocksdb/write_batch.h#L9
   



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

Reply via email to