mirror of
https://codeberg.org/forgejo/forgejo
synced 2025-10-19 00:30:46 +02:00
This patch contains two fixes/enhancements to two functions that were updating all columns of the `access_token` and `repository` table when they were only updating a select few columns. Within Codeberg we saw these two queries quite often when something problematic with the database was going on, likely because of this all columns update pattern. `UpdateAccessToken` is removed and a new function `UpdateLastUsed` was added, for `updateRepoRunsNumbers` we can simply add which columns we want to have updated in that query. It's likely there are more of such queries, but these were the ones being executed often. Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/9572 Reviewed-by: Michael Kriese <michael.kriese@gmx.de> Reviewed-by: Otto <otto@codeberg.org> Co-authored-by: Gusted <postmaster@gusted.xyz> Co-committed-by: Gusted <postmaster@gusted.xyz> |
||
---|---|---|
.. | ||
TestOrphanedOAuth2Applications | ||
access_token.go | ||
access_token_scope.go | ||
access_token_scope_test.go | ||
access_token_test.go | ||
auth_token.go | ||
main_test.go | ||
oauth2.go | ||
oauth2_list.go | ||
oauth2_test.go | ||
session.go | ||
session_test.go | ||
source.go | ||
source_test.go | ||
two_factor.go | ||
two_factor_test.go | ||
twofactor.go | ||
webauthn.go | ||
webauthn_test.go |