eolivelli commented on code in PR #23524:
URL: https://github.com/apache/pulsar/pull/23524#discussion_r1832172545
##########
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/cache/InflightReadsLimiter.java:
##########
@@ -56,7 +58,9 @@ public class InflightReadsLimiter implements AutoCloseable {
.help("Available space for inflight data read from storage or
cache")
.register();
- private final long maxReadsInFlightSize;
+ @Setter
+ @Getter
+ private long maxReadsInFlightSize;
Review Comment:
This variable should stay final
##########
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/cache/RangeEntryCacheImpl.java:
##########
@@ -362,6 +362,9 @@ private AsyncCallbacks.ReadEntriesCallback
handlePendingReadsLimits(ReadHandle l
}
long estimatedReadSize = (1 + lastEntry - firstEntry)
* (estimatedEntrySize + BOOKKEEPER_READ_OVERHEAD_PER_ENTRY);
+ if (estimatedReadSize > pendingReadsLimiter.getMaxReadsInFlightSize())
{
+ pendingReadsLimiter.setMaxReadsInFlightSize(estimatedReadSize);
Review Comment:
I am sorry, I was not clear.
The point is not about adding only the logging.
But we cannot update the configuration dynamically here.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]