[SERVER-31049] View with collation doesn't work as expected in sharded cluster Created: 12/Sep/17 Updated: 30/Oct/23 Resolved: 21/Sep/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying, Sharding |
| Affects Version/s: | 3.4.9 |
| Fix Version/s: | 3.4.10, 3.6.0-rc0 |
| Type: | Bug | Priority: | Critical - P2 |
| Reporter: | adrien petel | Assignee: | David Storch |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | read-only-views | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Mongodb 3.4.9, Ubuntu 16.04, sharded cluster |
||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Backport Requested: |
v3.4
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| Steps To Reproduce: | In single mongod instance:
In sharded cluster (2 shards, 3 config server started as replicaSet). Collection is not sharded Cluster info :
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| Sprint: | Query 2017-10-02 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| Linked BF Score: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Description |
|
Creating a view with a collation in a sharded cluster does not work as expected, whereas it works fine in a single mongod instance |
| Comments |
| Comment by Githook User [ 26/Sep/17 ] |
|
Author: {'email': 'david.storch@10gen.com', 'name': 'David Storch', 'username': 'dstorch'}Message: (cherry picked from commit 5f8d84b1792839a4b372e8479d0eccba6fd64357) Conflicts: |
| Comment by Githook User [ 21/Sep/17 ] |
|
Author: {'email': 'david.storch@10gen.com', 'name': 'David Storch', 'username': 'dstorch'}Message: |
| Comment by David Storch [ 12/Sep/17 ] |
|
Hi felix2626, I've tracked this down as an issue with how mongos handles the view catalog metadata returned to it by the primary shard. Specifically, the query does not correctly inherit the view's default collation when mongos rewrites the view query as a query over the base collection. The code with the defect is here: We plan to work on a fix within the next few weeks. Thanks again for the report and please let me know if you have any further questions or concerns. Best, |
| Comment by David Storch [ 12/Sep/17 ] |
|
Hi felix2626, Thanks for reporting this issue. I can reproduce this as you describe and am currently looking into the root cause. Best, |