[CDRIVER-2068] mongocxx::pool mongos failover Created: 15/Feb/17 Updated: 27/Oct/23 Resolved: 08/Mar/17 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | network |
| Affects Version/s: | 1.5.2 |
| Fix Version/s: | None |
| Type: | Task | Priority: | Minor - P4 |
| Reporter: | Aleksander Melnikov | Assignee: | Unassigned |
| Resolution: | Works as Designed | Votes: | 0 |
| Labels: | driver | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Windows 7 x64, Visual Studio 2015 |
||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Description |
|
We have shard cluster with 3 mongos instances for failover purposes. All mongos in future, will be distributed on different hosts (now they running on same host with different ports for test purposes). Does this behaviour is correct or maybe we need to additional setup mongocxx::pool environment for the mongos failover? |
| Comments |
| Comment by A. Jesse Jiryu Davis [ 08/Mar/17 ] | |||||||||||||
|
Thanks, here's what happens: 1. The C Driver should use all mongos servers equally, but it only uses the first mongos in the seed list due to a recent bug, I'm going to close this bug and continue work in the two related bugs. The mongos failover behavior itself is working as expected on Windows, but there is room for improvement. Thanks for beginning this investigation. | |||||||||||||
| Comment by Aleksander Melnikov [ 06/Mar/17 ] | |||||||||||||
|
now, ready to investigate: Q: If you keep retrying in a loop for 30 seconds or longer, does your application eventually recover and start using the second mongos?
app continue to work. Q: How soon after you kill the first mongos do you query the cluster again? Are you in the middle of a query, or do you query within 5 seconds of killing mongos, or more than 5 seconds after? Q: Does this bug manifest if you change your URI to this?:
.. then continue to normal work | |||||||||||||
| Comment by Aleksander Melnikov [ 04/Mar/17 ] | |||||||||||||
|
I will try to investigate the steps after returning from the vacation March 15 | |||||||||||||
| Comment by A. Jesse Jiryu Davis [ 03/Mar/17 ] | |||||||||||||
|
Hi Aleksander, have you had an opportunity to try steps 4,5,6,7 to help us diagnose? | |||||||||||||
| Comment by Aleksander Melnikov [ 25/Feb/17 ] | |||||||||||||
|
1) MongoDB version 3.4.2 | |||||||||||||
| Comment by David Golden [ 23/Feb/17 ] | |||||||||||||
|
Aleksander, I'm moving this question to the CDRIVER Jira project, as server monitoring for mongocxx is handled by libmongoc. Jesse is going to take the lead from here on out and I'll continue to watch the ticket. | |||||||||||||
| Comment by A. Jesse Jiryu Davis [ 23/Feb/17 ] | |||||||||||||
|
Hi, Aleksander.
"mongodb://host:27017,host:27033,host:27034/?socketTimeoutMS=10000" | |||||||||||||
| Comment by Aleksander Melnikov [ 22/Feb/17 ] | |||||||||||||
|
1) libmongoc version 1.5.2 | |||||||||||||
| Comment by David Golden [ 21/Feb/17 ] | |||||||||||||
|
Hi, Aleksander. Thanks for the report. I have some questions:
| |||||||||||||
| Comment by Aleksander Melnikov [ 15/Feb/17 ] | |||||||||||||
|
while using mongocxx::pool - a lot of exceptions occurs: After all - possible all pool entryes used, data continues to be send. |