[SERVER-30834] Make mongos reload the shard registry and re-establish changeStream cursors when encountering a 'retryNeeded' entry Created: 25/Aug/17  Updated: 30/Oct/23  Resolved: 15/Nov/17

Status: Closed
Project: Core Server
Component/s: Querying, Replication, Sharding
Affects Version/s: None
Fix Version/s: 3.6.0-rc5

Type: Task Priority: Major - P3
Reporter: Spencer Brody (Inactive) Assignee: Matthew Russotto
Resolution: Fixed Votes: 0
Labels: bkp
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Related
related to SERVER-32085 $changeStream reports incorrect docum... Closed
related to SERVER-31028 Reload shard registry and ensure set ... Closed
related to SERVER-31978 Add an invariant that DocumentSourceC... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v3.6
Sprint: Repl 2017-10-23, Repl 2017-11-13, Repl 2017-12-04
Participants:
Linked BF Score: 0

 Description   

Shards can return a 'retryNeeded' entry as part of a changeStream on a sharded collection. This happens when the shard recently donated a chunk for this collection to a shard that has no chunks for that collection. When a mongos encounters such an entry it needs to reload the shard registry (to pick up any recently added shards) and then establish changeStream cursors on any new shards it discovers. It will also need to filter out the 'retryNeeded' entry so it never gets back to the client.



 Comments   
Comment by Githook User [ 15/Nov/17 ]

Author:

{'name': 'Matthew Russotto', 'username': 'mtrussotto', 'email': 'matthew.russotto@10gen.com'}

Message: SERVER-30834 Unit tests for adding shards in AsyncResultsMerger.

(cherry picked from commit 07bab8342673aa337c72a6a6ef885cb7e66f066d)
Branch: v3.6
https://github.com/mongodb/mongo/commit/b6b0035e2a0830cd1c9e099bfd142f97e142a4d6

Comment by Githook User [ 15/Nov/17 ]

Author:

{'name': 'Matthew Russotto', 'username': 'mtrussotto', 'email': 'matthew.russotto@10gen.com'}

Message: SERVER-30834 Unit tests for adding shards in AsyncResultsMerger.
Branch: master
https://github.com/mongodb/mongo/commit/07bab8342673aa337c72a6a6ef885cb7e66f066d

Comment by Githook User [ 14/Nov/17 ]

Author:

{'name': 'Matthew Russotto', 'username': 'mtrussotto', 'email': 'matthew.russotto@10gen.com'}

Message: SERVER-30834 Look up collation for unsharded collection when running aggregate on mongos.

(cherry picked from commit b4f6f2c967afc21d03bfca68f09d148d50e59134)
Branch: v3.6
https://github.com/mongodb/mongo/commit/685001a0e63b7966f34b6513c886b156aee0258b

Comment by Githook User [ 14/Nov/17 ]

Author:

{'name': 'Matthew Russotto', 'username': 'mtrussotto', 'email': 'matthew.russotto@10gen.com'}

Message: SERVER-30834 Fix lookups from mongos to use uuid and understand NamespaceNotFound

(cherry picked from commit 7ee7fce34442c3d3588179edb61ebbc5083dbb69)
Branch: v3.6
https://github.com/mongodb/mongo/commit/6e618dac9c850f0bbcc9ef471243ac8a8abfd2e2

Comment by Githook User [ 14/Nov/17 ]

Author:

{'name': 'Matthew Russotto', 'username': 'mtrussotto', 'email': 'matthew.russotto@10gen.com'}

Message: SERVER-30834 Make mongos reload the shard registry and re-establish changeStream cursors when encountering a 'retryNeeded' entry

(cherry picked from commit d4a526fdcfa3f740220940b8bf6767da959d4b3d)
Branch: v3.6
https://github.com/mongodb/mongo/commit/38c84ff8516540e49425c8755f1d248177a109f7

Comment by Githook User [ 14/Nov/17 ]

Author:

{'name': 'Matthew Russotto', 'username': 'mtrussotto', 'email': 'matthew.russotto@10gen.com'}

Message: SERVER-30834 Look up collation for unsharded collection when running aggregate on mongos.
Branch: master
https://github.com/mongodb/mongo/commit/b4f6f2c967afc21d03bfca68f09d148d50e59134

Comment by Githook User [ 14/Nov/17 ]

Author:

{'name': 'Matthew Russotto', 'username': 'mtrussotto', 'email': 'matthew.russotto@10gen.com'}

Message: SERVER-30834 Fix lookups from mongos to use uuid and understand NamespaceNotFound
Branch: master
https://github.com/mongodb/mongo/commit/7ee7fce34442c3d3588179edb61ebbc5083dbb69

Comment by Githook User [ 14/Nov/17 ]

Author:

{'name': 'Matthew Russotto', 'username': 'mtrussotto', 'email': 'matthew.russotto@10gen.com'}

Message: SERVER-30834 Make mongos reload the shard registry and re-establish changeStream cursors when encountering a 'retryNeeded' entry
Branch: master
https://github.com/mongodb/mongo/commit/d4a526fdcfa3f740220940b8bf6767da959d4b3d

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