-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
feat: faster OIDC front/back-channel logout #3937
base: master
Are you sure you want to change the base?
Conversation
3a5ad64
to
c0b6da1
Compare
c0b6da1
to
aa1ee32
Compare
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.
Looks very good already!
|
||
q = fmt.Sprintf(` | ||
SELECT %s FROM %s c | ||
WHERE id IN ( |
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 think WHERE EXISTS
would be more performant here as the DB doesn't need to materialize the full sub query result.
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 am looking at some query plans. WHERE EXISTS
does some wild stuff. Might have to tinker a bit more to get this perfect. It's looking like the subselect will be easier to optimize, though.
p.NetworkID(ctx), | ||
).All(&cs); err != nil { | ||
return nil, sqlcon.HandleError(err) | ||
for _, c := range cs { |
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.
Avoid repeated allocations here.
for _, c := range cs { | |
withFrontChannelURL, withBackChannelURL = make([]client.Client, 0, len(cs)), make([]client.Client, 0, len(cs)) | |
for _, c := range cs { |
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.
We don't know how many of each we will have, though. So this will almost always over allocate. Let's keep it simple :)
Closes https://github.com/ory-corp/cloud/issues/7053