hachikuji commented on PR #12674: URL: https://github.com/apache/kafka/pull/12674#issuecomment-1273790399
Using `OFFSET_NOT_AVAILABLE` on followers seems to be the right direction I think. It is the only approach we've discussed which addresses the spurious out of range issue for users who want follower fetching on these clients. This error can already be returned after a normal leader change, so clients must handle it. Perhaps we could make the behavior more precise instead of blinding returning `OFFSET_NOT_AVAILABLE` for all fetches above the local end offset. The follower doesn't know if the offset is out of range or not since its log is always behind the leader, so we can argue it is incorrect for it to return the error in the first place. But it can find out by querying the leader. In fact, the `Fetch` request already returns the leader's end offset. Could we make use of that? Maybe we could hold out-of-range fetches in purgatory until the follower knows whether or not the leader has the requested offset? -- 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]
