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 random concurrency issue #21

Merged
merged 3 commits into from
Feb 8, 2024
Merged

Conversation

mcred
Copy link
Contributor

@mcred mcred commented Feb 8, 2024

Occasionally when re-running the git extension with an already existing repo, this error could occur:

Task java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask@5f2c773b[Not completed, task = java.util.concurrent.Executors$RunnableAdapter@5e5be0aa[Wrapped task = org.eclipse.jgit.lib.RepositoryCache$$Lambda$933/0x00007fd8e7618430@3e55a0a6]] rejected from java.util.concurrent.ScheduledThreadPoolExecutor@1e97af5a[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 1]

Re-ordering and putting repository.close() in the finally clause fixes it.

@mcred mcred requested a review from filipelautert February 8, 2024 04:11
@mcred mcred merged commit 0aae027 into main Feb 8, 2024
9 checks passed
@mcred mcred deleted the feature/jgit-exception-path-exists branch February 8, 2024 14:10
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