Skip to content
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

refine keyspace request encoding #742

Merged
merged 3 commits into from
Mar 21, 2023

Conversation

iosmanthus
Copy link
Member

No description provided.

Signed-off-by: iosmanthus <myosmanthustree@gmail.com>
Signed-off-by: iosmanthus <myosmanthustree@gmail.com>
return nil, err
}
// attachAPICtx will shallow copy the request.
req = attachAPICtx(c, req)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the new req will cover the old req which used in line 118.

@@ -97,9 +97,13 @@ func attachAPICtx(c Codec, req *tikvrpc.Request) (*tikvrpc.Request, error) {
switch r.Type {
case tikvrpc.CmdMPPTask:
mpp := *r.DispatchMPPTask()
mpp.Meta.KeyspaceId = ctx.KeyspaceId
mpp.Meta.ApiVersion = ctx.ApiVersion
// Shallow copy the request to avoid concurrent modification.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

request -> meta

Signed-off-by: iosmanthus <myosmanthustree@gmail.com>
@iosmanthus iosmanthus merged commit 2e8d7a2 into tikv:master Mar 21, 2023
@iosmanthus iosmanthus deleted the refine-keyspace-request-encoding branch March 21, 2023 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants