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

stale config error flattened when thrown after yielding in count() command

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Duplicate
    • Affects Version/s: 2.4.11
    • Fix Version/s: None
    • Component/s: Sharding
    • Labels:
      None
    • Operating System:
      ALL

      Description

      When a long-running count yields and a stale config exception is thrown (because of a migrate during the count, for example) it will be "flattened" into an unknown exception. This exception cannot then be retried automatically by mongos, but is passed to the user as:

      Error: count failed: {
      	"shards" : {
      		
      	},
      	"cause" : {
      		"ok" : 0,
      		"errmsg" : "13388 [foo.bar] shard version not ok in Client::Context: version mismatch detected for foo.bar, stored major version 2 does not match received 1 ( ns : foo.bar, received : 1|0||540893992c1d4403aaa7955a, wanted : 2|0||540893992c1d4403aaa7955a, send )"
      	},
      	"ok" : 0,
      	"errmsg" : "failed on : shard0000"
      }

      Reproduced on v2.4, v2.6 shows similar messaging but does not fail - still investigating. Master has different yielding behavior so it's not clear this still applies.

        Attachments

        1. stale_count_yield.js
          2 kB
          Greg Studer

          Issue Links

            Activity

              People

              Assignee:
              greg_10gen Greg Studer
              Reporter:
              greg_10gen Greg Studer
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: