-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Add max_parallel to mssql and postgresql #3026
Conversation
For storage backends, set max open connections to value of max_parallel.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two small comments, otherwise looks good!
if logger.IsDebug() { | ||
logger.Debug("couchdb: max_parallel set", "max_parallel", maxParInt) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should there be an else here to set the default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There can be, but since we don't call the sql
function to set the max open connections, it's unnecessary (using 0 will, for the permit pool, use the default anyways).
@@ -211,6 +226,9 @@ func (m *CouchDBBackend) Delete(key string) error { | |||
func (m *CouchDBBackend) List(prefix string) ([]string, error) { | |||
defer metrics.MeasureSince([]string{"couchdb", "list"}, time.Now()) | |||
|
|||
m.permitPool.Acquire() | |||
defer m.permitPool.Release() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should put and delete use the permit pool too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They already do! List didn't for some reason.
For storage backends, set max open connections to value of max_parallel.