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.
- is related to
-
CDRIVER-838 Support find, getMore and killCursor commands
- Closed