-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[fix][broker] Fix reading entries failed due to max in-flight reading #23524
Conversation
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/cache/RangeEntryCacheImpl.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should not update a global variable this way. The update will affect all of the ledgers/topics without control.
Also, we should add a test that reproduces the problem and ensures that it is fixed
@lhotari wdyt?
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/cache/RangeEntryCacheImpl.java
Show resolved
Hide resolved
private final long maxReadsInFlightSize; | ||
@Setter | ||
@Getter | ||
private long maxReadsInFlightSize; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This variable should stay final
@Technoboy- I'm working on a broader refactoring to address the issue. There are multiple challenges. I have reported multiple issues, #23482, #23504, #23505 and #23506. I'm working to resolve them soon. |
One reason why the read size could exceed managedLedgerMaxReadsInFlightSizeInMB is #23482, that's what I'm also addressing in my changes that are WIP (example commit, part of the WIP changes). |
ok, i will close this patch. |
Motivation
If the
estimatedReadSize
larger than themanagedLedgerMaxReadsInFlightSizeInMB
, reading entries will fail.Documentation
doc
doc-required
doc-not-needed
doc-complete