[SERVER-38975] Single-collection high water marks omit UUID on shards where the collection does not exist Created: 14/Jan/19 Updated: 29/Oct/23 Resolved: 02/Feb/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Aggregation Framework |
| Affects Version/s: | 4.1 Desired |
| Fix Version/s: | 4.0.7, 4.1.8 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Bernard Gorman | Assignee: | Bernard Gorman |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Backport Requested: |
v4.0
|
||||||||||||
| Sprint: | Query 2019-01-28, Query 2019-02-11 | ||||||||||||
| Participants: | |||||||||||||
| Description |
|
For single-collection change streams, high water mark tokens received from shards on which the collection does not exist will always omit the UUID. While these tokens function perfectly well for merging purposes, PBRTs returned to the client without the appropriate UUID cannot be used to resume the stream, since we cannot accurately determine the collection's default collation. |
| Comments |
| Comment by Githook User [ 01/Mar/19 ] |
|
Author: {'name': 'Bernard Gorman', 'email': 'bernard.gorman@gmail.com', 'username': 'gormanb'}Message: (cherry picked from commit fbb9daeb791d16c49b861d82c097cf9bd9daf07e) |
| Comment by Bernard Gorman [ 04/Feb/19 ] |
|
nicholas.cottrell: it's relevant to cases where a $changeStream is opened on an unsharded collection, OR on a sharded collection which does not exist on all shards (e.g. zoned sharding, or a newly-sharded collection which has not spread across the cluster yet). This is because $changeStream always establishes cursors across all the shards, since (1) we need to watch for migrations to shards that do not yet own chunks, and (2) if we're resuming, the resume point may reside on a shard which no longer owns any chunks. Each shard on which the collection does not yet exist will return high water mark tokens with no UUID, so we must ensure that we populate these before returning them to the client. |
| Comment by Nic Cottrell [ 04/Feb/19 ] |
|
bernard.gorman - do I understand from the description that this change is only relevant for cases where the customer is querying a non-sharded collection on a sharded cluster. If the collection is sharded and has documents on every shard, then this change will have no effect? |
| Comment by Githook User [ 02/Feb/19 ] |
|
Author: {'name': 'Bernard Gorman', 'email': 'bernard.gorman@gmail.com', 'username': 'gormanb'}Message: |