BUG REPORT
Describe the bug
Whenever major or minor compaction runs, it does not remove the log files which has utilised more than threshold value. But only remove the files with usage < threshold.
A clear and concise description of what the bug is.
I am seeing high disk usage in ledger directory in 3 bookie cluster, all 3 nodes have couple of log files with size 1.1GB which is the default max entry log file size before it creates a new one.
As per the documentation here for Major and Minor Compaction, it is supposed to delete the log files when remaining log file size reaches below threshold.
When trying to debug this in code found that condition is checking for meta.Usage > threshold and ignore the meta file which is supposed to get deleted, what I feel it should be checking the meta.Remaining > Threshold.
|
if (meta.getUsage() >= threshold || (maxTimeMillis > 0 && timeDiff.getValue() >= maxTimeMillis) |
To Reproduce
Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Expected behavior
A clear and concise description of what you expected to happen.
- Compaction should have removed the file if remaining file size < threshold.
Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.
BUG REPORT
Describe the bug
Whenever major or minor compaction runs, it does not remove the log files which has utilised more than threshold value. But only remove the files with usage < threshold.
A clear and concise description of what the bug is.
I am seeing high disk usage in ledger directory in 3 bookie cluster, all 3 nodes have couple of log files with size 1.1GB which is the default max entry log file size before it creates a new one.
As per the documentation here for Major and Minor Compaction, it is supposed to delete the log files when remaining log file size reaches below threshold.
When trying to debug this in code found that condition is checking for meta.Usage > threshold and ignore the meta file which is supposed to get deleted, what I feel it should be checking the meta.Remaining > Threshold.
bookkeeper/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/GarbageCollectorThread.java
Line 573 in dd80e96
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.