-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Cluster Management
-
None
On Jenkins, we occasionally see this stack trace:
java.lang.NullPointerException at com.mongodb.BaseCluster.getRandomServer(BaseCluster.java:204) at com.mongodb.BaseCluster.getServer(BaseCluster.java:75) at com.mongodb.DBTCPConnector.getServer(DBTCPConnector.java:650) at com.mongodb.DBTCPConnector.access$300(DBTCPConnector.java:39) at com.mongodb.DBTCPConnector$MyPort.error(DBTCPConnector.java:482) at com.mongodb.DBTCPConnector.innerCall(DBTCPConnector.java:301) at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:268) at com.mongodb.DBTCPConnectorTest.testConnectionReservationForReadThenWrite(DBTCPConnectorTest.java:137)
I've traced it down to ServerAddressSelector.choose returning a list with a single null element in the case where the ServerAddress is no longer in the cluster.