You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by "StevenLuMT (via GitHub)" <gi...@apache.org> on 2023/05/31 10:58:44 UTC
[GitHub] [bookkeeper] StevenLuMT commented on a diff in pull request #3976: [improve] add read rate limter for compaction
StevenLuMT commented on code in PR #3976:
URL: https://github.com/apache/bookkeeper/pull/3976#discussion_r1211524624
##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/GarbageCollectorThread.java:
##########
@@ -619,9 +622,10 @@ void doCompactEntryLogs(double threshold, long maxTimeMillis) throws EntryLogMet
meta.getEntryLogId(), meta.getUsage(), threshold);
}
- long priorRemainingSize = meta.getRemainingSize();
+ long compactSize = meta.getTotalSize() - meta.getRemainingSize();
+ compactionReadByteRateLimiter.acquire((int) (compactSize));
compactEntryLog(meta);
Review Comment:
Good catch, please see this comment @HQebupt
--
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