Skip to content

Add max_parallel to mssql and postgresql#3026

Merged
jefferai merged 1 commit intomasterfrom
postgres-max-parallel
Jul 17, 2017
Merged

Add max_parallel to mssql and postgresql#3026
jefferai merged 1 commit intomasterfrom
postgres-max-parallel

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).

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