You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by "hangc0276 (via GitHub)" <gi...@apache.org> on 2023/09/05 14:04:51 UTC

[GitHub] [bookkeeper] hangc0276 opened a new pull request, #4071: Print compaction progress

hangc0276 opened a new pull request, #4071:
URL: https://github.com/apache/bookkeeper/pull/4071

   ### Motivation
   When the garbage collection is triggered, we don't know the actual compaction progress, for example, the total entrylog files waiting to be compacted and how many entrylog files have been compacted. Without the information, we don't know when will the garbage collection will finish.
   
   ### Changes
   Print the garbage collection progress every one minutes, and the progress contains how many EntryLog files have been compaction and the total EntryLog files waiting to be 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


[GitHub] [bookkeeper] hangc0276 commented on pull request #4071: Print compaction progress

Posted by "hangc0276 (via GitHub)" <gi...@apache.org>.
hangc0276 commented on PR #4071:
URL: https://github.com/apache/bookkeeper/pull/4071#issuecomment-1706692092

   @horizonzy Please help take a look at this PR, thanks.


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


[GitHub] [bookkeeper] horizonzy commented on a diff in pull request #4071: Print compaction progress

Posted by "horizonzy (via GitHub)" <gi...@apache.org>.
horizonzy commented on code in PR #4071:
URL: https://github.com/apache/bookkeeper/pull/4071#discussion_r1316595538


##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/GarbageCollectorThread.java:
##########
@@ -591,6 +593,13 @@ void doCompactEntryLogs(double threshold, long maxTimeMillis) throws EntryLogMet
                 entryLogUsageBuckets);
 
         final int maxBucket = calculateUsageIndex(numBuckets, threshold);
+        int totalEntryLogIds = 0;
+        for (int currBucket = 0; currBucket <= maxBucket; currBucket++) {
+            totalEntryLogIds = compactableBuckets.get(currBucket).size();

Review Comment:
   `totalEntryLogIds = compactableBuckets.get(currBucket).size();` 
   ->
   `totalEntryLogIds += compactableBuckets.get(currBucket).size(); `



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


[GitHub] [bookkeeper] hangc0276 commented on a diff in pull request #4071: Print compaction progress

Posted by "hangc0276 (via GitHub)" <gi...@apache.org>.
hangc0276 commented on code in PR #4071:
URL: https://github.com/apache/bookkeeper/pull/4071#discussion_r1316645356


##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/GarbageCollectorThread.java:
##########
@@ -591,6 +593,13 @@ void doCompactEntryLogs(double threshold, long maxTimeMillis) throws EntryLogMet
                 entryLogUsageBuckets);
 
         final int maxBucket = calculateUsageIndex(numBuckets, threshold);
+        int totalEntryLogIds = 0;
+        for (int currBucket = 0; currBucket <= maxBucket; currBucket++) {
+            totalEntryLogIds = compactableBuckets.get(currBucket).size();

Review Comment:
   addressed



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


[GitHub] [bookkeeper] hangc0276 merged pull request #4071: Print compaction progress

Posted by "hangc0276 (via GitHub)" <gi...@apache.org>.
hangc0276 merged PR #4071:
URL: https://github.com/apache/bookkeeper/pull/4071


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