You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by "Nicklee007 (via GitHub)" <gi...@apache.org> on 2023/02/24 06:50:22 UTC

[GitHub] [bookkeeper] Nicklee007 commented on a diff in pull request #3802: Add trigger entry location index rocksDB compact REST API

Nicklee007 commented on code in PR #3802:
URL: https://github.com/apache/bookkeeper/pull/3802#discussion_r1116565490


##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/storage/ldb/KeyValueStorageRocksDB.java:
##########
@@ -369,6 +369,19 @@ public void compact(byte[] firstKey, byte[] lastKey) throws IOException {
         }
     }
 
+    @Override
+    public void compact() throws IOException {
+        try {
+            long start = System.currentTimeMillis();
+            log.info("Starting RocksDB {} compact.", db.getName());
+            db.compactRange();
+            long end = System.currentTimeMillis();
+            log.info("RocksDB {} compact finished {} ms.", db.getName(), end - start);

Review Comment:
   @dlg99 Sure, add the rocksDB total size and files count status and calculate the space reduce size after compacted.



-- 
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: commits-unsubscribe@bookkeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org