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

Add max_parallel to mssql and postgresql #3026

Merged
merged 1 commit into from
Jul 17, 2017
Merged

Conversation

jefferai
Copy link
Member

For storage backends, set max open connections to value of max_parallel.

For storage backends, set max open connections to value of max_parallel.
@jefferai jefferai added this to the 0.7.4 milestone Jul 17, 2017
Copy link
Contributor

@briankassouf briankassouf left a 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)
}
}
Copy link
Contributor

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?

Copy link
Member Author

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()
Copy link
Contributor

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?

Copy link
Member Author

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.

@jefferai jefferai merged commit 6876ee8 into master Jul 17, 2017
@jefferai jefferai deleted the postgres-max-parallel branch July 17, 2017 17:04
@jefferai jefferai modified the milestones: 0.7.4, 0.8.0 Jul 24, 2017
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.

2 participants