...
BugZero found this defect 2836 days ago.
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 // Unreachable host errors are swallowed if the 'allowPartialResults' option is set. if (allowPartialResults) { continue; } 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.
xgen-internal-githook commented on Fri, 3 Nov 2017 17:25:03 +0000: Author: {'name': 'Esha Maharishi', 'username': 'EshaMaharishi', 'email': 'esha.maharishi@mongodb.com'} Message: SERVER-28874 make allowPartialResults option only apply if exhausted retries on retriable errors Branch: master https://github.com/mongodb/mongo/commit/b74b769b0551697ae43c7f2690ff200cb4044819 esha.maharishi@10gen.com commented on Tue, 31 Oct 2017 22:20:40 +0000: 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. CC charlie.swanson@mongodb.com esha.maharishi@10gen.com commented on Tue, 25 Apr 2017 15:49:14 +0000: Note: add a test that exercises this behavior