bugfix: concurrent save getIssueFullPattern #7580

Closed
opened 2025-11-02 07:30:17 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @Dexus on GitHub (Jul 13, 2021).

Make sure the function in modules/makeup/html.go getIssueFullPattern() is concurrent save.

Originally created by @Dexus on GitHub (Jul 13, 2021). - Gitea version (or commit ref): https://github.com/go-gitea/gitea/commit/5ff807acdebdd75960418060f465bb8ba79e96a6 Make sure the function in modules/makeup/html.go getIssueFullPattern() is concurrent save.
GiteaMirror added the type/refactoring label 2025-11-02 07:30:17 -06:00
Author
Owner

@6543 commented on GitHub (Jul 13, 2021):

function Init() in modules/markup/renderer.go will initialize it so there should not be a race ... but I did a code cleanup with #16417

@6543 commented on GitHub (Jul 13, 2021): function `Init()` in modules/markup/renderer.go will initialize it so there should not be a race ... but I did a code cleanup with #16417
Author
Owner

@6543 commented on GitHub (Jul 13, 2021):

roadmap:

  • remove call in Init() at modules/markup/renderer.go
  • add an sync.Once lock next to issueFullPattern ... call it issueFullPatternInitOnce or so?
  • add an issueFullPatternInitOnce.Once(func() { init regex ... } ) to getIssueFullPattern()

@Dexus

@6543 commented on GitHub (Jul 13, 2021): roadmap: * remove call in `Init()` at modules/markup/renderer.go * add an sync.Once lock next to `issueFullPattern` ... call it **issueFullPatternInitOnce** or so? * add an issueFullPatternInitOnce.Once(func() { init regex ... } ) to getIssueFullPattern() @Dexus
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#7580