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

Table throttler: race condition #14178

Closed
shlomi-noach opened this issue Oct 4, 2023 · 0 comments · Fixed by #14179 or #14181
Closed

Table throttler: race condition #14178

shlomi-noach opened this issue Oct 4, 2023 · 0 comments · Fixed by #14179 or #14181

Comments

@shlomi-noach
Copy link
Contributor

While working on #14164 and #14165 I found a race condition in the tablet throttler:

case <-mysqlRefreshTicker.C:
{
// sparse
if throttler.IsOpen() {
go throttler.refreshMySQLInventory(ctx)
}
}

The function throttler.refreshMySQLInventory() should not be invoked with a goroutine; it must continue to run on same goroutine as the select clause, which is the single goroutine where all access to the throttler's fields is done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment