-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
kvserver: return destination from AdminScatter #51172
Conversation
This commit updates the AdminScatter request to return the node to which the range that was scattere was sent. This is information is used during restore's distsql flow. Release note: None
Actually thinking more about this, it may be cleaner if we just issue a |
I think it is reasonable for "please scatter this thing" to reply with "okay, i scattered it to X" instead of just "okay", but my opinion isn't really the one that matters here. Adding some kv folks. |
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.
Are you familiar with the ReturnRangeInfo
request header field? It seems like it should get populated with the lease as of the end of the command which for AdminScatter
will be the post-scatter lease IIUC.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @ajwerner, @andreimatei, and @dt)
Ah, yep - I took a gander through the header but missed that. That's exactly what I was reaching for - thanks for the pointer! |
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.
I'm currently getting rid of ReturnRangeInfo
, replacing it with something else: instead of explicitly asking for range info, the client is always gonna send info about what it believes the state of the range to be and the server is gonna reply with updates if it has any.
I don't think you really want to use this mechanism here... Returning the state of the lease after a request has run is not exactly what this was designed for. Plus, these RangeInfo responses will be terminated at the DistSender, they shouldn't make sense to a higher layer.
I think it'd be much better if you add an explicit response for AdminScatter
. And btw remind me pls how this scatter works - is it a range request (and so we rely on the DistSender to split it) or a point request? I think it's a range, but then I'm confused about why you had a single target_node
in the response and you didn't have to handle the merging of results in the DistSender
.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @andreimatei and @dt)
Sorry I missed your comment. |
Github seems to have gotten confused when updating a closed PR. Created #51607. |
This commit updates the AdminScatter request to return the node to which
the range that was scattere was sent. This is information is used during
restore's distsql flow.
Release note: None