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

sqlserver: limit concurrent database operations #1067

Merged
merged 1 commit into from Aug 20, 2021

Conversation

mialinx
Copy link
Contributor

@mialinx mialinx commented Aug 18, 2021

SQLServer

Limit number of concurrent database operations (eg backups)

Try to return http error to SQLServer on proxy panic

@mialinx mialinx requested a review from a team as a code owner August 18, 2021 08:49
@mialinx mialinx force-pushed the sqlserver_db_concurency branch 2 times, most recently from 9be21a6 to f2b5840 Compare August 19, 2021 14:58
internal/config.go Outdated Show resolved Hide resolved
if concurency == 0 {
concurency = cnt
}
sem := make(chan struct{}, concurency)
Copy link
Member

Choose a reason for hiding this comment

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

semaphore.NewWeighted?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

chans are idiomatic for simple semaphores, and we don't need weights here

@mialinx mialinx merged commit eaa57be into wal-g:master Aug 20, 2021
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