[SERVER-36212] getMore should not enforce that session id matches until FCV is 4.0 Created: 20/Jul/18  Updated: 29/Oct/23  Resolved: 28/Aug/18

Status: Closed
Project: Core Server
Component/s: Querying, Upgrade/Downgrade
Affects Version/s: 4.0.1
Fix Version/s: 4.0.3

Type: Bug Priority: Major - P3
Reporter: Charlie Swanson Assignee: Charlie Swanson
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
is documented by DOCS-12016 Docs for SERVER-36212: getMore should... Closed
Related
related to SERVER-34204 Tailable cursor fails on getMore agai... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Query 2018-08-27, Query 2018-09-10
Participants:

 Description   

Starting in 4.0 we validate that if a cursor was opened within a session then each getMore should include the same session id. Unfortunately, on 3.6 versions (up to the one in which SERVER-34204 is backported, if that happens), there is a known issue where a change stream will not include the lsid. This can cause problems when upgrading to 4.0, when your mongos is old and subject to this bug (which as far as I know doesn't have much of a user impact, maybe just that it doesn't ping the session to keep it alive as frequently?), but the shards will be more strict and cause the operation to fail.

To guard against this unpleasant upgrade scenario, we should only assert the getMore has a matching LSID if the FCV is at least 4.0.



 Comments   
Comment by Githook User [ 28/Aug/18 ]

Author:

{'name': 'Charlie Swanson', 'email': 'charlie.swanson@mongodb.com', 'username': 'cswanson310'}

Message: SERVER-36212 getMore shouldn't validate session id on FCV 3.6
Branch: v4.0
https://github.com/mongodb/mongo/commit/90c2c3638ab249531970d3ae6257e4819254d1de

Comment by Charlie Swanson [ 27/Aug/18 ]

Just waiting for an unfreeze of 4.0

Comment by Tess Avitabile (Inactive) [ 23/Jul/18 ]

This sounds safe to me, since transactions cannot be used with FCV 3.6, and this is only essential for cursors created within transactions.

Comment by Charlie Swanson [ 20/Jul/18 ]

Looks like the assertion in question was added by Tess as part of this commit. It's unclear which team should own this. As far as I understand: sharding team owns sessions, this was added as part of repl-set transactions work, and query owns getMore. Assigning to the query team for initial triage.

cc jack.mulrow tess.avitabile

Generated at Thu Feb 08 04:42:24 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.