mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 16:40:24 +08:00 
			
		
		
		
	Fix sqlite deadlock when assigning to a PR (#5640)
* Fix sqlite deadlock when assigning to a PR Fix 5639 Signed-off-by: Andrew Thornton <art27@cantab.net> * More possible deadlocks found and fixed Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
		@@ -44,7 +44,11 @@ func (issue *Issue) loadAssignees(e Engine) (err error) {
 | 
			
		||||
 | 
			
		||||
// GetAssigneesByIssue returns everyone assigned to that issue
 | 
			
		||||
func GetAssigneesByIssue(issue *Issue) (assignees []*User, err error) {
 | 
			
		||||
	err = issue.loadAssignees(x)
 | 
			
		||||
	return getAssigneesByIssue(x, issue)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func getAssigneesByIssue(e Engine, issue *Issue) (assignees []*User, err error) {
 | 
			
		||||
	err = issue.loadAssignees(e)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return assignees, err
 | 
			
		||||
	}
 | 
			
		||||
@@ -173,7 +177,7 @@ func (issue *Issue) changeAssignee(sess *xorm.Session, doer *User, assigneeID in
 | 
			
		||||
		issue.PullRequest.Issue = issue
 | 
			
		||||
		apiPullRequest := &api.PullRequestPayload{
 | 
			
		||||
			Index:       issue.Index,
 | 
			
		||||
			PullRequest: issue.PullRequest.APIFormat(),
 | 
			
		||||
			PullRequest: issue.PullRequest.apiFormat(sess),
 | 
			
		||||
			Repository:  issue.Repo.innerAPIFormat(sess, mode, false),
 | 
			
		||||
			Sender:      doer.APIFormat(),
 | 
			
		||||
		}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user