[CXX-71] ScopedDbConnection not being returned to the pool Created: 22/Feb/14 Updated: 10/Apr/14 Resolved: 13/Mar/14 |
|
| Status: | Closed |
| Project: | C++ Driver |
| Component/s: | None |
| Affects Version/s: | legacy-0.0-26compat-2.6.0-rc0 |
| Fix Version/s: | legacy-0.0-26compat-2.6.0-rc2 |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Pieter Willem Jordaan | Assignee: | Tyler Brock |
| Resolution: | Done | Votes: | 0 |
| Labels: | ScopedDbConnection, legacy-cxx | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
3.11.0-17-generic #31-Ubuntu SMP Mon Feb 3 21:52:43 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux mongo 2.5.5 + shared client driver |
||
| Issue Links: |
|
||||
| Description |
|
With a simple snippet like this
I get repeating warnings in console (of my application) : I initially thought it is because my replicaset contains one replica (only primary), but after adding another to the se, I saw the same, except now for both replicas. What makes this more strange is that the same test with the connection string: "127.0.0.1:27017" (no myset) does not have any warnings. |
| Comments |
| Comment by Pieter Willem Jordaan [ 13/Mar/14 ] | |||||||||||||||||||||||||||
|
Hi Tyler I apologize for my delayed response. I've also witnessed that the problem is gone in the 2.6.0-rc0 version. I am currently using the new tree for the client driver. Thank you | |||||||||||||||||||||||||||
| Comment by Tyler Brock [ 13/Mar/14 ] | |||||||||||||||||||||||||||
|
Hey Pieter, I'm going to close this issue for now since we haven't heard back from you and mark it as "gone away". We will happily re-open if you have any more questions about this. | |||||||||||||||||||||||||||
| Comment by Tyler Brock [ 12/Mar/14 ] | |||||||||||||||||||||||||||
|
Hey Pieter, In the future, if you could switch over to using the driver from the new mongo-cxx-driver repository under the legacy branch it would be better as support for building the client driver from the mongodb source code has been removed as of 2.6.0-rc1. With regards to the problem you were seeing, I was able to reproduce it and see it disappear by creating a simple test program like the one you suggest and running it against a single node replica set:
I compiled the program and ran it against the mongoclient shared library from 2.5.5 and 2.6.0-rc0. 2.5.5
2.6.0-rc0
The replica set monitor code has changed significantly since 2.5.5. This commit completely re-wrote how the the replica set monitor works: https://github.com/mongodb/mongo/commit/e031dffb83c2a6f9f64a7d055493a8664af997d5 While we did not change the code that prints this message or the behavior of done() we have changed the way the client connects to members of a replica set to get state information (for the better). Let me know if you would like to dig deeper or if you are satisfied with how it is working currently. I'd be happy to help. | |||||||||||||||||||||||||||
| Comment by Pieter Willem Jordaan [ 22/Feb/14 ] | |||||||||||||||||||||||||||
|
It seems fixed in 2.6.0 rc0 for me, though I can't seem to find the commit which fixed it from 2.5.5 | |||||||||||||||||||||||||||
| Comment by Pieter Willem Jordaan [ 22/Feb/14 ] | |||||||||||||||||||||||||||
|
More information. Its not explicitly related to using ScopedDbConnection. If I use
The same happens |