[SERVER-7985] $or within findAndModify with a mongos should correctly check if all expressions in one shard Created: 19/Dec/12 Updated: 06/Dec/22 Resolved: 19/Apr/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying, Sharding |
| Affects Version/s: | 2.2.2 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Matt Kalan | Assignee: | Backlog - Query Team (Inactive) |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Assigned Teams: |
Query
|
||||||||
| Operating System: | ALL | ||||||||
| Steps To Reproduce: | This fails , ]}, This works ------------- This fails , ]}, }}); This works }}); |
||||||||
| Participants: | |||||||||
| Description |
|
Currently doing an $or([ {key1: A1,key2: B1}, {key1:A2,key2:B2},...] fails in a sharded cluster because it does not first check if the values given are on the same shard, whereas $in does check. They should be consistent and do the best to implement findAndModify within one shard. The below steps to reproduce shows the differences. |
| Comments |
| Comment by David Storch [ 19/Apr/18 ] |
|
Agreed that this belongs with the query team. The limitation described here still exists. I'm marking this as a duplicate of a more recent ticket, SERVER-30225, since the newer ticket has additional details and more watchers. |
| Comment by Gregory McKeon (Inactive) [ 19/Apr/18 ] |
|
Found this as part of sharding reviewing old tickets - we believe this is a query issue. |