[CXX-993] autoreconnection feature Created: 17/Aug/16 Updated: 11/Sep/19 Resolved: 17/Aug/16 |
|
| Status: | Closed |
| Project: | C++ Driver |
| Component/s: | API |
| Affects Version/s: | 3.0.1 |
| Fix Version/s: | None |
| Type: | Task | Priority: | Minor - P4 |
| Reporter: | Andrey Kolkov | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
gcc-5.4, ubuntu 16_04 x64 |
||
| Description |
|
The legacy driver has feature in class mongo::DBClientConnection for autoreconnecting to server. It available via constructor parameter: mongo::DBClientConnection(bool _autoReconnect, ...). |
| Comments |
| Comment by David Golden [ 17/Aug/16 ] |
|
Because the C++11 driver wraps libmongoc, this happens automatically, which is standard for all "next generation" drivers. It will be more efficient using mongocxx::pool to get your clients as that uses a background thread to monitor replica set status. You can read more about how and why in these articles: |