[JAVA-59] per Mongo configuration options Created: 08/Dec/09  Updated: 13/Jan/10  Resolved: 09/Dec/09

Status: Closed
Project: Java Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 1.1

Type: Improvement Priority: Major - P3
Reporter: Eliot Horowitz (Inactive) Assignee: Eliot Horowitz (Inactive)
Resolution: Done Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on JAVA-58 make connection pooling per Mongo ins... Closed

 Description   
  • tcp connect timeout
  • tcp so timeout
  • # connections


 Comments   
Comment by Matt Seashore [ 10/Dec/09 ]

Thanks for the quick response! It looks much better now and doesn't display the NPE when calling the paired constructor.

Thanks again!
Matt

Comment by Eliot Horowitz (Inactive) [ 10/Dec/09 ]

Ok - i think i fixed that NPE.
Can you try again?

Comment by Matt Seashore [ 10/Dec/09 ]

Looks like the changes work well for me - the timeout works as I'd
expected. I'm passing in a customized MongoOptions() into the Mongo
(DBAddress1, DBAddress2, MongoOptions) constructor.

The only strange thing is I see a severe stack trace getting logged
(though it doesn't seem to adversely affect anything):

Dec 10, 2009 10:26:17 AM com.mongodb.DBTCPConnector _pickInitial
SEVERE: can't pick initial master, using random one
java.lang.NullPointerException
at com.mongodb.DBMessageLayer.doQuery(DBMessageLayer.java:52)
at com.mongodb.DBApiLayer$MyCollection.find(DBApiLayer.java:315)
at com.mongodb.DBTCPConnector._pickInitial(DBTCPConnector.java:314)
at com.mongodb.DBTCPConnector.<init>(DBTCPConnector.java:67)
at com.mongodb.Mongo.<init>(Mongo.java:118)
at ...

Thanks,

Matt

Comment by auto [ 09/Dec/09 ]

Author:

{'name': 'Eliot Horowitz', 'email': 'eliot@10gen.com'}

Message: connections are pooled per mongo
MongoOptions controls various connection settings
JAVA-59 JAVA-58
http://github.com/mongodb/mongo-java-driver/commit/5b6d5b5af6de85fa7f32de9a34da1eecf5b1a49c

Generated at Thu Feb 08 08:51:25 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.