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

Support cancel proto msgs #150

Merged
merged 4 commits into from
Jun 8, 2023
Merged

Support cancel proto msgs #150

merged 4 commits into from
Jun 8, 2023

Conversation

reshke
Copy link
Collaborator

@reshke reshke commented Jun 7, 2023

No description provided.

delete(r.clmp, cl.GetCancelPid())
}

func (r *RuleRouterImpl) CancelCleint(csm *pgproto3.CancelRequest) error {
Copy link
Collaborator

Choose a reason for hiding this comment

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

CancelClient

}
return nil
}
return fmt.Errorf("no client with pid %d", csm.ProcessID)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Im not sure if we should return an error here. Is this error will be passing to the client?
Seems like if there is no process, then client was already released?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this error will not be passed to the client


if cl, ok := r.clmp[csm.ProcessID]; ok {
if cl.GetCancelKey() != csm.SecretKey {
return fmt.Errorf("cancel sekret does not match")
Copy link
Collaborator

Choose a reason for hiding this comment

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

secret :)

@@ -31,4 +31,3 @@ SELECT pg_is_in_recovery() /* target-session-attrs: read-only */ , id FROM tsa_t
NOTICE: send query to shard(s) : sh2
ERROR: failed to find replica
message type 0x5a arrived from server while idle
ERROR: failed to find replica
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why are you drop this changes?

router/pkg/rulerouter/rulerouter.go Outdated Show resolved Hide resolved
@reshke reshke merged commit 399c348 into master Jun 8, 2023
4 checks passed
@reshke reshke deleted the rr branch June 19, 2023 06:13
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

2 participants