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

deploy: Fix mutex locking for global sync timeout #2969

Merged
merged 1 commit into from
Aug 4, 2023

Conversation

cgwalters
Copy link
Member

The locking here was always too long - by holding the mutex during the sync() call, it means g_cond_wait_until() can never wake up (because its API requires the mutex to be locked).

Confusingly though of course we do still print the "timed out" message, and I think that tricked us when we were doing testing here.

We only need to lock the mutex when we're manipulating shared state, which basically boils down to the gboolean success.

The locking here was always too long - by holding the mutex
during the `sync()` call, it means `g_cond_wait_until()` can
never wake up (because its API requires the mutex to be locked).

Confusingly though of course we do still print the "timed out"
message, and I think that tricked us when we were doing testing
here.

We only need to lock the mutex when we're manipulating shared
state, which basically boils down to the `gboolean success`.
Copy link
Member

@jmarrero jmarrero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@jmarrero jmarrero merged commit 7f70614 into ostreedev:main Aug 4, 2023
23 checks passed
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.

None yet

2 participants