KAFKA-20678: Add timeout in replica manager log reader remote read.#22707
Open
smjn wants to merge 3 commits into
Open
KAFKA-20678: Add timeout in replica manager log reader remote read.#22707smjn wants to merge 3 commits into
smjn wants to merge 3 commits into
Conversation
apoorvmittal10
left a comment
Contributor
There was a problem hiding this comment.
Thanks for the PR, one comment.
Comment on lines
+235
to
+237
| future.completeExceptionally(new TimeoutException( | ||
| "Remote read for " + remoteStorageFetchInfo + " did not complete within " + timeoutMs + " ms.")); | ||
| } |
Contributor
There was a problem hiding this comment.
Don't we also need not to cancel the pending future for remote calls?
| }; | ||
| // Cancel the timer task once the read completes (either outcome) so it does not linger in the wheel. | ||
| future.whenComplete((info, exception) -> timeoutTask.cancel()); | ||
| replicaManager.addShareFetchTimerRequest(timeoutTask); |
Contributor
There was a problem hiding this comment.
Also why share fetch timer API being used here? Also should we make it callers responsibility to handle the timeouts?
Comment on lines
+235
to
+236
| future.completeExceptionally(new TimeoutException( | ||
| "Remote read for " + remoteStorageFetchInfo + " did not complete within " + timeoutMs + " ms.")); |
Contributor
There was a problem hiding this comment.
Just completing it exceptionally might not be a good idea as the method can still return the locally fetched data while skipping the remote storage partitions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ReplicaManagerLogReader.readAsync fetches data from remote storage, if
enabled. The response is async. Current code does not bound this call to
remote storage. This PR uses the existing
remoteFetchMaxWaitMstoalleviate the situation by scheduling a timed killer task into the
replica manager's timer wheel.
A new integ test has been added to ShareConsumerDLQTest to verify e-2-e
tiering based DLQ.
Reviewers: Apoorv Mittal apoorvmittal10@gmail.com