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/03/29 02:36:09 UTC
[GitHub] [bookkeeper] StevenLuMT commented on a diff in pull request #3895: [feature] [server] add dbStorage_readAheadCacheBatchBytesSize properties when read ahead entries
StevenLuMT commented on code in PR #3895:
URL: https://github.com/apache/bookkeeper/pull/3895#discussion_r1151332312
##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/storage/ldb/SingleDirectoryDbLedgerStorage.java:
##########
@@ -695,6 +696,18 @@ private void fillReadAheadCache(long orginalLedgerId, long firstEntryId, long fi
}
}
+ private boolean chargeReadAheadCache(int currentReadAheadCount, long currentReadAheadBytes) {
Review Comment:
> can we add unit tests for this ? you can make it a static method, it will be very easy to write an unit test.
> the logic is not straightforward, a test with edge cases will help
Thanks for reviewing , I will add unit test today @eolivelli
--
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