[PR #225] [CLOSED] Fix database write context interleaving bug #15234

Closed
opened 2025-11-02 11:41:58 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/225
Author: @stroucki
Created: 11/23/2016
Status: Closed

Base: masterHead: 20161027issuemail


📝 Commits (2)

  • ac3ee00 UpdateIssueUsersByMentions was calling database write operations while
  • 57004bc issue: forgot debug statement

📊 Changes

3 files changed (+13 additions, -11 deletions)

View changed files

📝 models/issue.go (+7 -7)
📝 models/issue_comment.go (+5 -3)
📝 models/issue_mail.go (+1 -1)

📄 Description

(Copied from gogits/gogs)
UpdateIssueUsersByMentions was calling database write operations while
a transaction session was in progress. MailParticipants was failing
silently because of the SQLITE_LOCKED error. Make sure failures in
MailParticipants enter the log, and pass on the transaction context.
Addresses #3760.

issue: let caller pass in database context, and use it
issue_comment: obtain database context to pass to UpdateIssueMentions
issue_comment: log any error from call to MailParticipants
issue_mail: pass on database context to UpdateIssueMentions


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-gitea/gitea/pull/225 **Author:** [@stroucki](https://github.com/stroucki) **Created:** 11/23/2016 **Status:** ❌ Closed **Base:** `master` ← **Head:** `20161027issuemail` --- ### 📝 Commits (2) - [`ac3ee00`](https://github.com/go-gitea/gitea/commit/ac3ee00d2f85562e59c4495d3b0319630e4195e1) UpdateIssueUsersByMentions was calling database write operations while - [`57004bc`](https://github.com/go-gitea/gitea/commit/57004bc4fe9743c26d9b53a6c38551fd096340f2) issue: forgot debug statement ### 📊 Changes **3 files changed** (+13 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `models/issue.go` (+7 -7) 📝 `models/issue_comment.go` (+5 -3) 📝 `models/issue_mail.go` (+1 -1) </details> ### 📄 Description (Copied from gogits/gogs) UpdateIssueUsersByMentions was calling database write operations while a transaction session was in progress. MailParticipants was failing silently because of the SQLITE_LOCKED error. Make sure failures in MailParticipants enter the log, and pass on the transaction context. Addresses #3760. issue: let caller pass in database context, and use it issue_comment: obtain database context to pass to UpdateIssueMentions issue_comment: log any error from call to MailParticipants issue_mail: pass on database context to UpdateIssueMentions --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-02 11:41:58 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#15234