Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-28874

make stale shardVersion error override 'allowPartialResults' option in establishCursors()

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.6.0-rc3
    • Affects Version/s: 3.4.3, 3.5.6
    • Component/s: Querying, Sharding
    • None
    • Fully Compatible
    • Sharding 2017-09-11, Sharding 2017-10-23, Sharding 2017-11-13

      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.

            Assignee:
            esha.maharishi@mongodb.com Esha Maharishi (Inactive)
            Reporter:
            esha.maharishi@mongodb.com Esha Maharishi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: