mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-05 09:55:20 +02:00
Use buffersize to reduce database connection when iterate (#2724)
* use buffersize to reduce database connection when iterate * fix typo * add default value on app.ini comment
This commit is contained in:
parent
2112eb8741
commit
985a39590b
7 changed files with 19 additions and 15 deletions
|
@ -816,7 +816,7 @@ func ChangeUserName(u *User, newUserName string) (err error) {
|
|||
}
|
||||
|
||||
// Delete all local copies of repository wiki that user owns.
|
||||
if err = x.
|
||||
if err = x.BufferSize(setting.IterateBufferSize).
|
||||
Where("owner_id=?", u.ID).
|
||||
Iterate(new(Repository), func(idx int, bean interface{}) error {
|
||||
repo := bean.(*Repository)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue