Skip to content

Commit

Permalink
improve the logic
Browse files Browse the repository at this point in the history
  • Loading branch information
poorbarcode committed Feb 5, 2025
1 parent 2b47edc commit 3c14ea0
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -420,8 +420,7 @@ void doAsyncReadEntriesByPosition(ReadHandle lh, Position firstPosition, Positio

@VisibleForTesting
public long getEstimatedEntrySize(ReadHandle lh) {
if ((!lh.isClosed() && lh.getLastAddConfirmed() < 1000)
|| lh.getLength() == 0 || lh.getLastAddConfirmed() < 0) {
if (lh.getLength() == 0 || lh.getLastAddConfirmed() < 0) {
// No entries stored.
return Math.max(getAvgEntrySize(), DEFAULT_ESTIMATED_ENTRY_SIZE) + BOOKKEEPER_READ_OVERHEAD_PER_ENTRY;
}
Expand Down

0 comments on commit 3c14ea0

Please sign in to comment.