-
Type:
Task
-
Resolution: Fixed
-
Priority:
Major - P3
-
None
-
Affects Version/s: 1.11.0
-
Component/s: libmongoc
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Application using older c driver, e.g. 1.6, which does not support session is allowed to have following flow:
- using older version c driver api, get a client through client pool
- construct a find bson command
- issue the command using collectionCommandWithOpts
- bson containing cursor id information is returned
- construct a getMore bson command using the cursor id
- issue the command using collectionCommandWithOpts
- all batches are successfully returned
However, using c driver with newer version, the above flow is broken. Server will sometimes returns error in step (6) - "Cannot run getMore on cursor ..., which was created in session ..."
The followings are some points about the causes:
- implicit session is implemented for cursor, however, its only implemented for mongoc_cursor_t returned api
- session pool implemented in c driver will have chance to cause the getMore command in (6) to acquire a new session or reused another pooled session, which is not same as the session used by find command in (3)
From the specification defined, with backward compatibility consideration, existing application is not required to make changes to run properly.
Should we treat this issue as bug or should we change our application to adapt the driver session change?