Details
-
Bug
-
Status: Closed
-
Major - P3
-
Resolution: Fixed
-
2.5.3
Description
After initializing a Mongo object I sometimes get a NPE when I first try to use that instance.
java.lang.NullPointerException
at
com.mongodb.ReplicaSetStatus.ensureMaster(ReplicaSetStatus.java:301)
at com.mongodb.DBTCPConnector.checkMaster(DBTCPConnector.java:
383)
at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:192)
at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:
295)
at com.mongodb.DB.getCollectionNames(DB.java:259)
at com.mongodb.DB.collectionExists(DB.java:300)
at
net.avail.db.mongodb.MongoHourlyMetricsAggregator.ensureCollectionsExists(MongoHourlyMetricsAggregator.java:
43)
Expected:
Better concurrency handling and on an unexpected error such as no master found a more descriptive exception than a NPE.