[JAVA-382] NPE in ReplicaSetStatus.ensureMaster Created: 16/Jun/11 Updated: 10/Aug/11 Resolved: 23/Jun/11 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | Cluster Management |
| Affects Version/s: | 2.5.3 |
| Fix Version/s: | 2.6.4 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Jon Ivmark | Assignee: | Antoine Girbal |
| Resolution: | Done | Votes: | 0 |
| Labels: | concurrency, replication | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Description |
|
After initializing a Mongo object I sometimes get a NPE when I first try to use that instance. java.lang.NullPointerException Expected: Better concurrency handling and on an unexpected error such as no master found a more descriptive exception than a NPE. |
| Comments |
| Comment by auto [ 23/Jun/11 ] |
|
Author: {u'login': u'agirbal', u'name': u'agirbal', u'email': u'antoine@10gen.com'}Message: |
| Comment by Jon Ivmark [ 22/Jun/11 ] |
|
I got the same exception using 2.6.3: java.lang.NullPointerException The patch solves the NPE (and now a MongoException will be thrown insterad?), but why is there no master node found initially? How are you supposed to handle this on the client, catch MongoException and retry can't really be the recommended way? Jon |
| Comment by Testo [ 20/Jun/11 ] |
|
add the patch |