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

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

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.4.11
    • Component/s: Sharding
    • None
    • ALL

      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.

        1. stale_count_yield.js
          2 kB
          Greg Studer

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

              Created:
              Updated:
              Resolved: