[SERVER-33944] Change stream on sharded collection with non-simple default collation is erroneously invalidated upon chunk migration Created: 16/Mar/18 Updated: 27/Oct/23 Resolved: 12/Mar/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Ian Boros | Assignee: | Backlog - Query Team (Inactive) |
| Resolution: | Gone away | Votes: | 0 |
| Labels: | open_todo_in_code | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Assigned Teams: |
Query
|
||||||||||||
| Operating System: | ALL | ||||||||||||
| Participants: | |||||||||||||
| Linked BF Score: | 60 | ||||||||||||
| Description |
|
As background, when a change stream is opened on a collection that doesn't exist, the change stream is invalidated if the collection is created with a collation other than the collation specified on the change stream. The following steps can lead to a change stream getting erroneously invalidated (say we have a sharded cluster with 2 shards and 1 mongos): At step 3 we will establish cursors on all of the shards, using the collection-default collation. On shard 0 this is whatever non-simple collation we created the collection with. Shard 1 doesn't know the collection exists, so its default is the simple collation. At step 4, the 'createCollection' oplog entry will get applied on shard 1. This means that when shard 1 reads from the change stream, it will see a 'createCollection' with a collation other than the one being used by the change stream. This will trigger an invalidate. Here's a repro:
resmoke.py --suites=no_passthrough repro-file.js CC charlie.swanson david.storch nicholas.zolnierz |
| Comments |
| Comment by Ian Boros [ 06/Mar/19 ] |
|
bernard.gorman Looks good! Once |
| Comment by Ian Boros [ 05/Mar/19 ] |
|
bernard.gorman I believe that's correct. I'm marking this ticket as "depends on" that work. It would still be nice to test the scenario described above to be sure this actually goes away once |
| Comment by Bernard Gorman [ 04/Mar/19 ] |
|
ian.boros: am I right in thinking that this will go away when we do |