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

copydb should not use exhaust flag when used against mongos

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.6.6, 2.8.0-rc2
    • Affects Version/s: 2.6.4, 2.7.4
    • Component/s: Sharding
    • Labels:
      None
    • ALL

      This seems to have crept into 2.7.x. I'm not sure which version yet but it's likely related to SERVER-12750. If so the problem might also exist in 2.6.4.

      mongos> use foo
      switched to db foo
      mongos> db.bar.insert({foo: 'bar'})
      WriteResult({ "nInserted" : 1 })
      mongos> use admin
      switched to db admin
      mongos> db.runCommand({copydb: 1, fromdb: 'foo', todb: 'foo1'})
      { "ok" : 1 }
      mongos> db.runCommand({copydb: 1, fromdb: 'foo', todb: 'foo2', fromhost: 'localhost:27017'})
      {
      	"errmsg" : "exception: nextSafe(): { $err: \"the 'exhaust' query option is invalid for mongos queries: foo.bar { query: {}, $snapshot: true }\", code: 18526 }",
      	"code" : 13106,
      	"ok" : 0
      }
      

      Buildinfo:

      mongos> db.runCommand('buildInfo')
      {
      	"version" : "2.7.7-pre-",
      	"gitVersion" : "ccacca83853931e2d03c8670c1745dfac515e119 modules: subscription",
      	"OpenSSLVersion" : "OpenSSL 1.0.1i 6 Aug 2014",
      	"sysInfo" : "Linux devbox 3.16.1-gentoo #1 SMP PREEMPT Thu Aug 14 08:35:28 PDT 2014 x86_64 BOOST_LIB_VERSION=1_49",
      	"loaderFlags" : "-fPIC -pthread -Wl,-z,now -rdynamic -Wl,-E",
      	"compilerFlags" : "-Wnon-virtual-dtor -Woverloaded-virtual -std=c++11 -fPIC -fno-strict-aliasing -ggdb -pthread -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch -pipe -Werror -O3 -Wno-unused-local-typedefs -Wno-unused-function -Wno-deprecated-declarations -Wno-unused-but-set-variable -fno-builtin-memcmp -std=c99",
      	"allocator" : "tcmalloc",
      	"versionArray" : [
      		2,
      		7,
      		7,
      		-100
      	],
      	"javascriptEngine" : "V8",
      	"bits" : 64,
      	"debug" : false,
      	"maxBsonObjectSize" : 16777216,
      	"ok" : 1
      }
      

            Assignee:
            randolph@mongodb.com Randolph Tan
            Reporter:
            bernie@mongodb.com Bernie Hackett
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: