-
Notifications
You must be signed in to change notification settings - Fork 42
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
Conversation
router/pkg/rulerouter/rulerouter.go
Outdated
delete(r.clmp, cl.GetCancelPid()) | ||
} | ||
|
||
func (r *RuleRouterImpl) CancelCleint(csm *pgproto3.CancelRequest) error { |
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.
CancelClient
} | ||
return nil | ||
} | ||
return fmt.Errorf("no client with pid %d", csm.ProcessID) |
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.
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?
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.
this error will not be passed to the client
router/pkg/rulerouter/rulerouter.go
Outdated
|
||
if cl, ok := r.clmp[csm.ProcessID]; ok { | ||
if cl.GetCancelKey() != csm.SecretKey { | ||
return fmt.Errorf("cancel sekret does not match") |
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.
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 |
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.
Why are you drop this changes?
No description provided.