warn when shotover doesnt know how to route a request #1779
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.
1
When shotover encounters a request type it does not know how to route it will route it to a random node.
This is a reasonable guess and in the worst case the broker will respond with a routing error which we return to the client.
However this does make it hard to track down issues caused by this random routing which can occur when
To make it easier to diagnose these issues this PR does two things:
2
Unfortunately things are never that simple.
The OffsetForLeaderEpoch request is being sent to shotover as part of our test suite and requires routing to partition leader but has no routing implemented yet.
It was failing due to incorrect routing but then eventually succeeds when the random routing arrives at the partition leader node.
So I decided to implement routing for this node rather than just adding explicit random node routing and leaving a TODO.
OffsetForLeaderEpoch requires request splitting for the same reasons that fetch and produce requests need to be split.
So this PR also implements routing, splitting and joining of OffsetForLeaderEpoch requests.