commit | 2722c9bfed3396f7fa0785c5e8e412fd412f03c0 | [log] [tgz] |
---|---|---|
author | Kevin Wilson <klwilson227@comcast.net> | Thu Apr 01 00:42:44 2021 -0600 |
committer | GitHub <noreply@github.com> | Thu Apr 01 14:42:44 2021 +0800 |
tree | 21e2ac193c5673201bfcf06470946f91bf2a5a31 | |
parent | 1ae510dcda369b7a744945ab9d61e242c7b0e941 [diff] |
Defect-Fix Compaction status report into correct buckets. (#2645) The compaction status report is off by 1. When compaction is enabled, the 10% log is always empty. Setting the compaction threshold to .2 we were seeing the number of compacted entrylogs that were removed, match the sum of the 20% and 30% buckets. While the 10% bucket remained empty. Increasing the threshold to .3 we would see the sum of the first 4 buckets compacted (10%-40%). Also with the 10% bucket empty. Upon inspection of the code, the code is using the .ceil function to calculate the bucket index to be updated. This means that 10% bucket will never be used. However, there could be a rare 100% case in which the code runs into a index out of bounds exception when the entrylog is actually 100% used. The index calculation should be using floor and not the ceil call using the next index lower. So usage of .00 to .9 ends up in the 0 index instead of the current calculation which puts the .0 - .9 in the 1 index. This will leave the 100% index empty most of the time, as rarely will the entry logs be 100% used.
Apache BookKeeper is a scalable, fault tolerant and low latency storage service optimized for append-only workloads.
It is suitable for being used in following scenarios:
Please visit the Documentation from the project website for more information.
For filing bugs, suggesting improvements, or requesting new features, help us out by opening a Github issue or opening an Apache jira.
Subscribe or mail the user@bookkeeper.apache.org list - Ask questions, find answers, and also help other users.
Subscribe or mail the dev@bookkeeper.apache.org list - Join development discussions, propose new ideas and connect with contributors.
Join us on Slack - This is the most immediate way to connect with Apache BookKeeper committers and contributors.
We feel that a welcoming open community is important and welcome contributions.
See Developer Setup to get your local environment setup.
Take a look at our open issues: JIRA Issues Github Issues.
Review our coding style and follow our pull requests to learn about our conventions.
Make your changes according to our contribution guide.