[JAVA-1285] Force frequent connection attempts when waiting for cluster description Created: 18/Jun/14  Updated: 30/Jan/15  Resolved: 24/Jun/14

Status: Closed
Project: Java Driver
Component/s: Cluster Management
Affects Version/s: None
Fix Version/s: 2.12.3, 3.0.0

Type: Bug Priority: Major - P3
Reporter: Jeffrey Yemin Assignee: Jeffrey Yemin
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

The method BaseCluster.getDescription() should mimic the behavior of BaseCluster.selectServer() to force more frequent connection attempts in the case where the cluster description is not yet known. This is important because in many cases getDescription() is called before calling selectServer().



 Comments   
Comment by Githook User [ 30/Jan/15 ]

Author:

{u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}

Message: JAVA-1217: Instead of increasing the retry frequency for an unreachable server, always use the same frequency, and force an attempt to connect only when there is a failure of the server selector to find a matching server.
JAVA-1284: MongoTimeoutException should include the total time waited before timing out, not just the last time through the loop
JAVA-1285: When server selection fails to find a match, await only for connectRetryFrequency, instead of maxWaitTime, so that attempts to re-connect to each server happen more frequently.
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/4f969b79d955bb5b90e1db947a7e1f682b19f918

Comment by Githook User [ 01/Aug/14 ]

Author:

{u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}

Message: JAVA-1285: formatting
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/9a5554950292b8944ba3c86b8fa33f4a2a8043e3

Comment by Githook User [ 01/Aug/14 ]

Author:

{u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}

Message: JAVA-1285: Await the minimum of the connect retry frequency and the remaining wait time
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/0ad15654b785723cfd84735c2e2505bd3e838a34

Comment by Githook User [ 01/Aug/14 ]

Author:

{u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}

Message: JAVA-1285: Take two
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/5bcd2f805901842f300012473e35f5ba10ed82a6

Comment by Githook User [ 01/Aug/14 ]

Author:

{u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}

Message: JAVA-1285: When server selection fails to find a match, await only for connectRetryFrequency, instead of maxWaitTime, so that attempts to re-connect to each server happen more frequently.
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/06e567ca394691d7b1f4774f50358a2b02158e05

Comment by Githook User [ 01/Aug/14 ]

Author:

{u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}

Message: JAVA-1285: When waiting for the cluster description, force a connection attempt each time through the loop
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/e10b6d7373ae9a95c0f6d1afcf8102714ede7e6b

Comment by Githook User [ 24/Jun/14 ]

Author:

{u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}

Message: JAVA-1217: Instead of increasing the retry frequency for an unreachable server, always use the same frequency, and force an attempt to connect only when there is a failure of the server selector to find a matching server.
JAVA-1284: MongoTimeoutException should include the total time waited before timing out, not just the last time through the loop
JAVA-1285: When server selection fails to find a match, await only for connectRetryFrequency, instead of maxWaitTime, so that attempts to re-connect to each server happen more frequently.
Branch: 3.0.x
https://github.com/mongodb/mongo-java-driver/commit/4f969b79d955bb5b90e1db947a7e1f682b19f918

Comment by Jeffrey Yemin [ 20/Jun/14 ]

Pushed to 2.12.x, still need to port to 3.0.x.

Comment by Githook User [ 20/Jun/14 ]

Author:

{u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}

Message: JAVA-1285: formatting
Branch: 2.12.x
https://github.com/mongodb/mongo-java-driver/commit/9a5554950292b8944ba3c86b8fa33f4a2a8043e3

Comment by Githook User [ 20/Jun/14 ]

Author:

{u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}

Message: JAVA-1285: Await the minimum of the connect retry frequency and the remaining wait time
Branch: 2.12.x
https://github.com/mongodb/mongo-java-driver/commit/0ad15654b785723cfd84735c2e2505bd3e838a34

Comment by Githook User [ 20/Jun/14 ]

Author:

{u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}

Message: JAVA-1285: Take two
Branch: 2.12.x
https://github.com/mongodb/mongo-java-driver/commit/5bcd2f805901842f300012473e35f5ba10ed82a6

Comment by Githook User [ 20/Jun/14 ]

Author:

{u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}

Message: JAVA-1285: When server selection fails to find a match, await only for connectRetryFrequency, instead of maxWaitTime, so that attempts to re-connect to each server happen more frequently.
Branch: 2.12.x
https://github.com/mongodb/mongo-java-driver/commit/06e567ca394691d7b1f4774f50358a2b02158e05

Comment by Githook User [ 20/Jun/14 ]

Author:

{u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}

Message: JAVA-1285: When waiting for the cluster description, force a connection attempt each time through the loop
Branch: 2.12.x
https://github.com/mongodb/mongo-java-driver/commit/e10b6d7373ae9a95c0f6d1afcf8102714ede7e6b

Generated at Thu Feb 08 08:54:14 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.