Skip to content

fix: race conditions in replicasync #5289

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

Merged
merged 1 commit into from
Dec 5, 2022
Merged

Conversation

mtojek
Copy link
Member

@mtojek mtojek commented Dec 5, 2022

Fixes: #5286

While fighting with flakes I noticed possible race conditions in enterprise (logs in the issue).

@@ -276,6 +276,8 @@ func (m *Manager) syncReplicas(ctx context.Context) error {
return xerrors.Errorf("ping database: %w", err)
}

m.mutex.Lock()
Copy link
Member Author

Choose a reason for hiding this comment

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

server.SetCallback(func() {
m.Lock()
Copy link
Member Author

Choose a reason for hiding this comment

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

@mtojek mtojek marked this pull request as ready for review December 5, 2022 16:16
@mtojek mtojek requested a review from a team December 5, 2022 16:16
@mtojek mtojek self-assigned this Dec 5, 2022
@mtojek mtojek merged commit e04877a into coder:main Dec 5, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Dec 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

flaky: enterprise/replicasync race detected during execution of test
2 participants