[PR #1414] [CLOSED] Fix data races in the logger module #15897

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

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/1414
Author: @typeless
Created: 3/30/2017
Status: Closed

Base: masterHead: fix-races-of-logger


📝 Commits (7)

  • bce07fd Fix data races
  • 38e7ce3 Follow the defer pattern
  • 1915793 Remove -race. This shouldn't be in production code.
  • 7974b2a Follow the defer-unlock pattern
  • 67278d2 Avoid deadlocks
  • 31394cf Use RWMutex instead of Mutex
  • f20a686 Fix read-and-update race

📊 Changes

1 file changed (+18 additions, -4 deletions)

View changed files

📝 modules/log/log.go (+18 -4)

📄 Description

Fixes #1412


🔄 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/1414 **Author:** [@typeless](https://github.com/typeless) **Created:** 3/30/2017 **Status:** ❌ Closed **Base:** `master` ← **Head:** `fix-races-of-logger` --- ### 📝 Commits (7) - [`bce07fd`](https://github.com/go-gitea/gitea/commit/bce07fd6cd9530ceeb8645f9cf288af136877233) Fix data races - [`38e7ce3`](https://github.com/go-gitea/gitea/commit/38e7ce3bdf7c29eadd6454125961e24f10935683) Follow the defer pattern - [`1915793`](https://github.com/go-gitea/gitea/commit/1915793553b0682c52f918947e9085bad49ec41d) Remove -race. This shouldn't be in production code. - [`7974b2a`](https://github.com/go-gitea/gitea/commit/7974b2a9b750fe8b7b576070d3da191431d0860f) Follow the defer-unlock pattern - [`67278d2`](https://github.com/go-gitea/gitea/commit/67278d27d93c83fd3f94ce0bc1d6bd4031ba3ac8) Avoid deadlocks - [`31394cf`](https://github.com/go-gitea/gitea/commit/31394cf18c21242ffc4b2a8cccb1a2c973e5b7f0) Use RWMutex instead of Mutex - [`f20a686`](https://github.com/go-gitea/gitea/commit/f20a68633a9ea60be9af6f205cbe3e92f5dac40d) Fix read-and-update race ### 📊 Changes **1 file changed** (+18 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `modules/log/log.go` (+18 -4) </details> ### 📄 Description Fixes #1412 --- <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:57:11 -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#15897