[CXX-1353] Tail cursor block thread after network switching Created: 31/May/17 Updated: 27/Oct/23 Resolved: 02/Jun/17 |
|
| Status: | Closed |
| Project: | C++ Driver |
| Component/s: | None |
| Affects Version/s: | 3.1.1 |
| Fix Version/s: | None |
| Type: | Task | Priority: | Minor - P4 |
| Reporter: | Denis Bip | Assignee: | Unassigned |
| Resolution: | Works as Designed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
debian 8.6 |
||
| Description |
|
Hello! When I run tail cursor in while loop and disable network adapter for a few minutes the thread that reading tail cursor become blocked. Version is 3.1.1 with custom update for tail cursors work
|
| Comments |
| Comment by Denis Bip [ 11/Jun/17 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sorry! I forgot to switch to the newest version of library on other project! Works fine | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Denis Bip [ 10/Jun/17 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi again! When I run this code any capped collection it works, but if I try to run on oplog.rs it works only first ~1-2 minutes and than it stops | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Samuel Rossi (Inactive) [ 02/Jun/17 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Awesome! I'm glad we were able to help | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Denis Bip [ 01/Jun/17 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Thank you very much! With socketTimeoutMS works fine! | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Samuel Rossi (Inactive) [ 31/May/17 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi Denis! I've written a small sample program that demonstrates what Jesse suggested in case you want to see it in action:
If you cut off your internet connection while the program is running, it should exit with an error after 5 seconds (plus the time to finish the current batch, which shouldn't be more than a second or two). Let me know if this doesn't work for you, or if you have any other questions! | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by A. Jesse Jiryu Davis [ 31/May/17 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
The default socketTimeoutMS for the C Driver is 5 minutes, what happens if you include something shorter in your connection string?:
|