[JAVA-191] Possible leak in Java 2.2 Driver with ReplicaSetStatus$Updater Created: 15/Oct/10 Updated: 29/Oct/10 Resolved: 27/Oct/10 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | None |
| Affects Version/s: | 2.2 |
| Fix Version/s: | 2.3 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Marc Esher | Assignee: | Eliot Horowitz (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
There appears to be a leak in the latest Mongo To replicate, you should just need to create multiple instances of What I'm seeing is that those Mongo instances stay around forever. If I haven't read the source, but it appears that this spawns a thread In the forums, Eliot suggested calling Mongo.close(). I did that and observed two things: 1) After doing so and taking a heap dump, the ReplicaSetStatus$Updater instances still remained. This was also evidenced by shutting down Mongo and watching the com.mongodb.ReplicaSetStatus$Node update Warning errors still appear in the app server logs 2) when initializing Mongo with a server/port and not a List of ServerAddresses, calling Mongo.close() throws an error. This is in the context of my web container. I could not replicate it in a simple standalone java example. java.lang.NullPointerException at |
| Comments |
| Comment by auto [ 27/Oct/10 ] |
|
Author: {'login': 'erh', 'name': 'Eliot Horowitz', 'email': 'eliot@10gen.com'}Message: fix potential memory leak |