-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
perf: Use more performant way to obtain and check the email as a login name with token login #41927
Conversation
b396c27
to
f4668c2
Compare
…n name with token login Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
381db45
to
0ccf84b
Compare
@nickvergessen As discussed via chat, I split out the additional index and moved it to #42022 to not forget about that. |
if (!(\count($users) === 1 && $this->login($users[0]->getUID(), $password))) { | ||
|
||
if ($isTokenPassword) { | ||
$dbToken = $this->tokenProvider->getToken($password); |
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.
Nice shortcut ;)
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.
So far, so good.
By the way, I think it's helpful to attach the point explanations in the pull request description in the various commit bodies.
/backport to stable28 |
/backport to stable27 |
/backport to stable26 |
/backport to stable25 |
Automatic backports have failed... |
/backport a3a343c,3cd1d74a815531c9b7ae25ebbf8e7c45fa566e74 to stable28 |
/backport a3a343c,3cd1d74a815531c9b7ae25ebbf8e7c45fa566e74 to stable27 |
/backport a3a343c,3cd1d74a815531c9b7ae25ebbf8e7c45fa566e74 to stable26 |
/backport a3a343c,3cd1d74a815531c9b7ae25ebbf8e7c45fa566e74 to stable25 |
UserManager::getByEmail is slow on large userbases so we should avoid it where possible.
Add a partial index to the configvalue to ensure that most email checks can use an indexed query-> Moved to perf: Add partial index on configvalue of preferences table #42022KEY `tmp_configvalue_index` (`configvalue`(80)),
cannot create index on expression with datatype LOB
TODO: