Skip to content

Concurrency Issues #773

@pjbgf

Description

@pjbgf

go-git is not thread-safe. In some cases, concurrent reads may lead to repositories becoming corrupted or actions to yield invalid results (e.g. not finding an existing ref).

There is quite a bit of work until we can answer: What operations are concurrency safe and I can call from different Goroutines?

Current status
  • Support read concurrency
    • Map concurrency issues (v6-exp)
      • repository.CommitObjects().Foreach() (v6-exp)
      • repository.Tags().Foreach() (v6-exp)
    • Create concurrency tests to avoid regression
  • Off-set performance costs for using mutex (or add an opt-in/out flag)
  • Worktree.Add()

Please share in the comments any specific operations you may having issues to use concurrently.

Relates to: #186 #48 #175

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingno-autocloseIssues/PRs to be ignored by stale bot

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy