mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +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:
		@@ -113,15 +113,15 @@ func notifyWatchers(e Engine, act *Action) error {
 | 
			
		||||
 | 
			
		||||
		switch act.OpType {
 | 
			
		||||
		case ActionCommitRepo, ActionPushTag, ActionDeleteTag, ActionDeleteBranch:
 | 
			
		||||
			if !act.Repo.CheckUnitUser(act.UserID, false, UnitTypeCode) {
 | 
			
		||||
			if !act.Repo.checkUnitUser(e, act.UserID, false, UnitTypeCode) {
 | 
			
		||||
				continue
 | 
			
		||||
			}
 | 
			
		||||
		case ActionCreateIssue, ActionCommentIssue, ActionCloseIssue, ActionReopenIssue:
 | 
			
		||||
			if !act.Repo.CheckUnitUser(act.UserID, false, UnitTypeIssues) {
 | 
			
		||||
			if !act.Repo.checkUnitUser(e, act.UserID, false, UnitTypeIssues) {
 | 
			
		||||
				continue
 | 
			
		||||
			}
 | 
			
		||||
		case ActionCreatePullRequest, ActionMergePullRequest, ActionClosePullRequest, ActionReopenPullRequest:
 | 
			
		||||
			if !act.Repo.CheckUnitUser(act.UserID, false, UnitTypePullRequests) {
 | 
			
		||||
			if !act.Repo.checkUnitUser(e, act.UserID, false, UnitTypePullRequests) {
 | 
			
		||||
				continue
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user