|
Steps to reproduce:
- stop mongod service (single machine deployment)
- use a driver
java.lang.NullPointerException
|
at com.mongodb.DBTCPConnector._error(DBTCPConnector.java:287)
|
at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:213)
|
at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:296)
|
at com.mongodb.DBCursor._check(DBCursor.java:356)
|
at com.mongodb.DBCursor._hasNext(DBCursor.java:486)
|
at com.mongodb.DBCursor.hasNext(DBCursor.java:511)
|
The _error method doesn't count that _rsStatus might be null.
boolean _error( Throwable t, boolean slaveOk )
|
throws MongoException {
|
if ( _rsStatus.hasServerUp() ){
|
// the replset has at least 1 server up, try to see if should switch master
|
checkMaster( true , !slaveOk );
|
}
|
return _rsStatus.hasServerUp();
|
}
|
|