zymap commented on code in PR #4044:
URL: https://github.com/apache/bookkeeper/pull/4044#discussion_r1286883905
##########
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;
Review Comment:
I don't think so. Users can flush multiple times using the same batch. Even
you flush the batch, the batch's content doesn't clean up. If we reset it after
flushing, the count is not accurate. So I follow the API to reset the batch.
--
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]