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


##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/storage/ldb/KeyValueStorageRocksDB.java:
##########
@@ -548,17 +560,31 @@ public void remove(byte[] key) throws IOException {
         @Override
         public void clear() {
             writeBatch.clear();
+            batchCount = 0;
         }
 
         @Override
         public void deleteRange(byte[] beginKey, byte[] endKey) throws 
IOException {
             try {
                 writeBatch.deleteRange(beginKey, endKey);
+                countBatchAndFlushIfNeeded();

Review Comment:
   We need to discuss whether deleteRange should also be performed within a 
batch. A deleteRange operation can potentially delete a large number of keys. 
If we include multiple deleteRange operations within a single batch, I am 
concerned that it may introduce issues. 
   
   The previous core dump #3734 issue could be related to this.
   
   



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