Skip to content
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

fix(git): Reduce concurrency to avoid lock file conflicts. #6511

Merged
merged 1 commit into from
Jun 16, 2023

Conversation

matt1097
Copy link
Contributor

This PR should resolve #5074 (or at the very list make the likelyhood of it occurring much less).

The underlying simple-git library defaults maxConcurrentProcesses to 5. This creates problems when multiple tasks run needing to acquire the git lock file (add, commit, etc..).
By changing this value to 1, simple-git will now manage the queue of commands internally, running one at a time.

Before this change, i could upload 3 ~800kb jpgs and almost 100% of the time get a git error on 2 of the git add steps. This would eventually then lead to a git syncing error with the storage module.

Post this change, I could no longer reproduce the error.

There is likely a side effect of git actions take a bit longer on startup and if multiple page saves are happening simultaneously. Those tend to happen asynchronously in my observation so an end user likely wont see this slight slow down.

@auto-assign auto-assign bot requested a review from NGPixel June 16, 2023 20:49
@NGPixel NGPixel merged commit f02b7ba into requarks:main Jun 16, 2023
@NGPixel
Copy link
Member

NGPixel commented Jun 16, 2023

Thanks!

jionggyu pushed a commit to jionggyu/wiki-2.5.302-patch that referenced this pull request Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants