[JAVA-1477] Server selection exception should chain exceptions from server monitors Created: 24/Sep/14  Updated: 30/Jan/15  Resolved: 07/Oct/14

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

Type: Improvement 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   

Currently BaseCluster.selectServer throws a MongoTimeoutException if no matching servers can be found for the selector. But if the reason there are no matching servers is due to one or more exceptions in the server monitors, these exceptions are not communicated to the caller in any way.

For example, if the server monitor fails to connect due to an authentication issue or an IOException, that will not be part of the exception thrown to the caller.



 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: The MongoTimeoutException thrown from BaseCluster methods now includes a short description of the cluster state,
which includes a short description of each server being monitored, which includes a short description of any exception
thrown while monitoring.

JAVA-1477
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/08e9a5f32f447f87930d039353cea6894b03bfab

Comment by Githook User [ 07/Oct/14 ]

Author:

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

Message: The MongoTimeoutException thrown from BaseCluster methods now includes a short description of the cluster state,
which includes a short description of each server being monitored, which includes a short description of any exception
thrown while monitoring.

JAVA-1477
Branch: 3.0.x
https://github.com/mongodb/mongo-java-driver/commit/08e9a5f32f447f87930d039353cea6894b03bfab

Comment by Githook User [ 06/Oct/14 ]

Author:

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

Message: The MongoTimeoutException thrown from BaseCluster methods now includes a short description of the cluster state,
which includes a short description of each server being monitored, which includes a short description of any exception
thrown while monitoring.

JAVA-1477
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/5049d16d14215bddf6f42bbcd2c87669821bb86e

Comment by Githook User [ 06/Oct/14 ]

Author:

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

Message: The MongoTimeoutException thrown from BaseCluster methods now includes a short description of the cluster state,
which includes a short description of each server being monitored, which includes a short description of any exception
thrown while monitoring.

JAVA-1477

Conflicts:
src/main/com/mongodb/ServerDescription.java
src/test/com/mongodb/ServerDescriptionTest.java
Branch: 2.12.x
https://github.com/mongodb/mongo-java-driver/commit/c0a05b42c4661574d0940e7acf04e63b2150652b

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