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

no available connections cause by concurrency request limit bug #1225

Closed
crazycs520 opened this issue Mar 14, 2024 · 0 comments · Fixed by #1226
Closed

no available connections cause by concurrency request limit bug #1225

crazycs520 opened this issue Mar 14, 2024 · 0 comments · Fixed by #1226

Comments

@crazycs520
Copy link
Contributor

crazycs520 commented Mar 14, 2024

Bug Report

#1098 introduced concurrency request limit.

if hasHighPriorityTask || c.available() > 0 {

func (c *batchCommandsClient) available() int64 {
return c.maxConcurrencyRequestLimit.Load() - c.sent.Load()
}

Following is the general situation about the upper code:

hasHighPriorityTask = false  // most request don't have high priority.
c.maxConcurrencyRequestLimit = math.MaxInt64 // by default
c.sent >= 0

In general, the above code works fine. But it will have a bug with the data race in #1222 :

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 a pull request may close this issue.

1 participant