[SERVER-33869] make $changeStream on shards check shardVersion Created: 14/Mar/18  Updated: 29/Oct/23  Resolved: 22/Mar/18

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 3.7.2
Fix Version/s: 3.6.4, 3.7.4

Type: Bug Priority: Major - P3
Reporter: Esha Maharishi (Inactive) Assignee: Esha Maharishi (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v3.6
Sprint: Sharding 2018-03-26
Participants:

 Description   

If an aggregate with $changeStream is sent to a shard, the shard will:

Since shard version checking is done in AutoGetCollectionForReadCommand but not AutoGetCollection, this means the changeStream on the shard does not check shardVersion for the change stream's underlying namespace, but for "oplog.rs".

This can be fixed by changing AutoGetCollection for change streams in runAggregate() to AutoGetCollectionForReadCommand, but may cause complications with currentOp and top output.

CC charlie.swanson, also would we want to backport this to 3.6?



 Comments   
Comment by Githook User [ 22/Mar/18 ]

Author:

{'email': 'esha.maharishi@mongodb.com', 'name': 'Esha Maharishi', 'username': 'EshaMaharishi'}

Message: SERVER-33869 make $changeStream on shards check shardVersion

(cherry picked from commit acaa16d190a0a5ef6a431e8a4b3eacd54a529ed7)
Branch: v3.6
https://github.com/mongodb/mongo/commit/f655d53a9da6b58ff255c1885a55ffa1cfecfef4

Comment by Githook User [ 22/Mar/18 ]

Author:

{'email': 'esha.maharishi@mongodb.com', 'name': 'Esha Maharishi', 'username': 'EshaMaharishi'}

Message: SERVER-33869 make $changeStream on shards check shardVersion
Branch: master
https://github.com/mongodb/mongo/commit/9d4968620215d5d18720605514a765641c896538

Comment by Charlie Swanson [ 14/Mar/18 ]

esha.maharishi I agree this should probably be backported. I've checked the box

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