-
Notifications
You must be signed in to change notification settings - Fork 14.5k
KAFKA-14915: allow read remote storage for multiple partitions in one fetchRequest #20045
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
Conversation
30894b4
to
50a2d77
Compare
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.
Thanks for the patch! Overall LGTM.
Few points:
- The FETCH request now has to wait to get response from all the remote partitions. And, it can have tail-latency. This tradeoff is fine considering the consumer might have to read the same data in the upcoming FETCH requests. This can be documented in the PR.
- When
minOneMessage
set to false (from second partition in the request), and there are multiple remote reads in the given FETCH request. We may read the data from remote and then drop those when the size of the message does not fit the partition limit. This was fine for local-reads but remote-reads might fetch chunk of data and multiple responses might be dropped. Shall we add some DEBUG logs when the remote fetched data gets dropped?
core/src/test/scala/integration/kafka/server/DelayedRemoteFetchTest.scala
Show resolved
Hide resolved
core/src/test/scala/integration/kafka/server/DelayedRemoteFetchTest.scala
Show resolved
Hide resolved
Good point. I've updated the doc in
I agree with you. Added a debug log. Thanks for the review! |
Thanks @showuon for the PR, I will review this PR by Monday. |
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.
LGTM! Thanks for the patch!
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.
LGTM. Thanks.
I tried on my local machine and I can see remote partitions being read in parallel and increased throughput.
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.
Thanks @showuon for the PR, overall LGTM.
Left a couple of comments on minor typos int he test.
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.
Thanks @showuon for addressing the comments. LGTM.
This PR enables reading remote storage for multiple partitions in one
fetchRequest. The main changes are:
DelayedRemoteFetch
, we accept multiple remoteFetchTasks andother metadata now.
DelayedRemoteFetch
, we'll wait until all remoteFetch done,either succeeded or failed.
ReplicaManager#fetchMessage
, we'll create oneDelayedRemoteFetch
and pass multiple remoteFetch metadata to it, andwatch all of them.