-
Notifications
You must be signed in to change notification settings - Fork 702
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Concurrency Issues #773
Comments
To help us keep things tidy and focus on the active tasks, we've introduced a stale bot to spot This particular issue hasn't had any updates or activity in the past 90 days, so it's been labeled We understand everyone's busy, but if this issue is still important to you, please feel free to add Thanks for your understanding and cooperation! |
Thanks for the info, at least for my usecase (showing various commits from the Kernel tree), the impact was within what I'd consider to be noise. This could obviously be different for more complex operations, but I do not have the insight into the codebase to properly benchmark this. |
I want to collect commits details with go-git/v5, but it spent too much time, so I want to collect commits concurrently. @pjbgf Are you still working on it? Let me know if I can do some help. |
@d4x1 happy for you to take over, if you can, as I have been quite busy of late. Here are three commits (not merged) that I worked on: The main blocker on merging any of those changes are performance regression. So we need to benchmark and call out the impact. If the impact is too great, we may need to add a way for users to opt-out/in. |
Sets up concurrent processing of git commits. Updates the version of go-git library to a specific branch that supports concurrent reads of the git filesystem. [go-git/go-git#773
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?
I created a branch to start amassing fixes around concurrency issues. As this has a performance cost, I won't propose merging it into
master
just yet. Folks insterested on using it can consume the changes via:go get github.com/go-git/go-git/v5@read-concurrency
Current status
repository.CommitObjects().Foreach()
repository.Tags().Foreach()
Worktree.Add()
Please share in the comments any specific operations you may having issues to use concurrently.
Relates to: #186 #48 #175
The text was updated successfully, but these errors were encountered: