[SERVER-28874] make stale shardVersion error override 'allowPartialResults' option in establishCursors() Created: 19/Apr/17 Updated: 30/Oct/23 Resolved: 03/Nov/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying, Sharding |
| Affects Version/s: | 3.4.3, 3.5.6 |
| Fix Version/s: | 3.6.0-rc3 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Esha Maharishi (Inactive) | Assignee: | Esha Maharishi (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Sprint: | Sharding 2017-09-11, Sharding 2017-10-23, Sharding 2017-11-13 | ||||||||||||
| Participants: | |||||||||||||
| Description |
|
We should add "!ErrorCodes::isStaleShardingError() &&" when checking whether to discard an error from a shard because of the allowPartialResults flag. https://github.com/mongodb/mongo/blob/r3.5.6/src/mongo/s/query/establish_cursors.cpp#L112-L115
This bug also exists in the ARM on 3.4 (although in 3.4, we didn't swallow retriable errors). Also, should we really swallow all other errors? The only other error we check for on both 3.4 and 3.6 is ErrorCodes::CommandOnShardedViewNotSupportedOnMongod. |
| Comments |
| Comment by Githook User [ 03/Nov/17 ] |
|
Author: {'name': 'Esha Maharishi', 'username': 'EshaMaharishi', 'email': 'esha.maharishi@mongodb.com'}Message: |
| Comment by Esha Maharishi (Inactive) [ 31/Oct/17 ] |
|
Since aggregation sits on top of establishCursors(), aggregation has the ability to support allowPartialResults (in addition to find), but it currently does not. This ticket adds a js test case that aggregation fails if 'allowPartialResults' is passed in the command, and the test case can be removed when we decide to officially support aggregation with allowPartialResults. |
| Comment by Esha Maharishi (Inactive) [ 25/Apr/17 ] |
|
Note: add a test that exercises this behavior |