Skip to content

Conversation

sirsean
Copy link

@sirsean sirsean commented Jul 18, 2011

I've added a new option for connecting to a Mongo database: maxConnectionRetryTime. This allows you to configure the total amount of time you spend retrying a request if the Mongo server is completely down. Setting the socketTimeout and connectTimeout don't work for that; it'll just keep retrying for the same amount of time regardless because DBPort will keep going until you've expended CONN_RETRY_TIME_MS.

This change allows you to (optionally) configure that value. It's backwards-compatible; if you don't do anything, it continues to use the old value (15000).

Also included in this pair of commits: a change to mavenPush.py to let it run on systems that don't have the "sha1sum" program available. I'm on Snow Leopard, and "sha1sum" doesn't exist. The new mavenPush.py will use sha1sum if it's available, and if not will use openssl directly to determine the SHA-1 hash of the jar file.

sirsean added 2 commits July 18, 2011 16:16
This uses openssl directly, only if the sha1sum shortcut doesn't exist.
If the Mongo server goes down completely, you may want to have control over the total amount of time you wait to connect to it before failing. The existing connectTimeout and socketTimeout values don't have any real effect on that; decreasing them doesn't change the fact that DBPort will still keep retrying until you've spent CONN_RETRY_TIME_MS milliseconds. This change lets you (optionally) configure that value from its default of 15000.
@agirbal agirbal closed this Aug 4, 2011
@agirbal
Copy link
Contributor

agirbal commented Aug 4, 2011

thanks the feature was ported to trunk

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