You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2021/03/15 17:37:34 UTC

[GitHub] [bookkeeper] klwilson227 opened a new pull request #2645: Defect-Fix Compaction status report into correct buckets.

klwilson227 opened a new pull request #2645:
URL: https://github.com/apache/bookkeeper/pull/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. 
   
   


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

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



[GitHub] [bookkeeper] klwilson227 commented on pull request #2645: Defect-Fix Compaction status report into correct buckets.

Posted by GitBox <gi...@apache.org>.
klwilson227 commented on pull request #2645:
URL: https://github.com/apache/bookkeeper/pull/2645#issuecomment-804785238


   Test cases updated. Please review.


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

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



[GitHub] [bookkeeper] klwilson227 commented on pull request #2645: Defect-Fix Compaction status report into correct buckets.

Posted by GitBox <gi...@apache.org>.
klwilson227 commented on pull request #2645:
URL: https://github.com/apache/bookkeeper/pull/2645#issuecomment-804784066


   @eolivelli @jiazhai @sijie  is the integration test flaky as this run was rebased on top of master and had issues loading etc docker container which I believe is not related to change.


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

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



[GitHub] [bookkeeper] jiazhai merged pull request #2645: Defect-Fix Compaction status report into correct buckets.

Posted by GitBox <gi...@apache.org>.
jiazhai merged pull request #2645:
URL: https://github.com/apache/bookkeeper/pull/2645


   


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

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



[GitHub] [bookkeeper] jiazhai commented on pull request #2645: Defect-Fix Compaction status report into correct buckets.

Posted by GitBox <gi...@apache.org>.
jiazhai commented on pull request #2645:
URL: https://github.com/apache/bookkeeper/pull/2645#issuecomment-810390884


   @zymap to also take a look


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

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



[GitHub] [bookkeeper] eolivelli commented on pull request #2645: Defect-Fix Compaction status report into correct buckets.

Posted by GitBox <gi...@apache.org>.
eolivelli commented on pull request #2645:
URL: https://github.com/apache/bookkeeper/pull/2645#issuecomment-800943438


   thank you @klwilson227 
   
   can you please add a unit test (no need to start the bookie) ?


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

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



[GitHub] [bookkeeper] jiazhai commented on pull request #2645: Defect-Fix Compaction status report into correct buckets.

Posted by GitBox <gi...@apache.org>.
jiazhai commented on pull request #2645:
URL: https://github.com/apache/bookkeeper/pull/2645#issuecomment-810389302


   @klwilson227 Thanks for the help. right. the CI failure is not related. I triggered a re-run


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

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