Skip to content

Batch calling of updateIssuesMeta causes database deadlock #17469

@wxiaoguang

Description

@wxiaoguang

Gitea Version

dev(main)

Description

Bug:

const promises = [];
Object.keys(items).forEach((elementId) => {
const item = items[elementId];
const promise = updateIssuesMeta(
item['update-url'],

It causes database deadlock and results in error response (some data can not be updated correctly, and the page can not be reloaded)

2021/10/28 17:51:22 .../repo/issue_label.go:209:UpdateIssueLabel() [E] RemoveLabel: Error 1213: Deadlock found when trying to get lock; try restarting transaction
2021/10/28 17:51:23 Completed POST /root/test/issues/labels 500 Internal Server Error in 421.528354ms

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/confirmedIssue has been reviewed and confirmed to be present or accepted to be implementedtopic/uiChange the appearance of the Gitea UItype/bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions