[CDRIVER-1079] Close socket after timeout from tailable cursor Created: 31/Jan/16  Updated: 05/Feb/16  Resolved: 02/Feb/16

Status: Closed
Project: C Driver
Component/s: libmongoc
Affects Version/s: 1.3.0
Fix Version/s: 1.3.2

Type: Bug Priority: Blocker - P1
Reporter: A. Jesse Jiryu Davis Assignee: A. Jesse Jiryu Davis
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to CDRIVER-838 Support find, getMore and killCursor ... Closed

 Description   

With MongoDB 3.2+, set a short sockettimeoutms like 100ms and begin a tailable query with awaitData. After mongoc_cursor_next times out, do any subsequent operation.

Expected: the socket has been closed, so the next operation opens a new socket and proceeds normally.

Actual: the socket used for the query is still open, so it reads the query response instead of the current operation's response. The response will be like:

{ "cursor" : { "nextBatch" : [  ], "id" : 27258456539, "ns" : "dbtest.test_capped" }, "ok" : 1 }

The bug is in the "getMore" command path with MongoDB 3.2+ (wire protocol version 4+), but not in the legacy OP_GETMORE path.



 Comments   
Comment by Githook User [ 05/Feb/16 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-1079 network err from command resets server
Branch: r1.3
https://github.com/mongodb/mongo-c-driver/commit/a6e15a8ca854bbc6ff7c82b09384dbe64f2dceee

Comment by Githook User [ 02/Feb/16 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-1079 network err from command resets server
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/07ee7cf6f6e0b0695bef5b69c6fbdda6b13e426e

Generated at Wed Feb 07 21:11:30 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.