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

db.stats() returns 0 for all counters on slave

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.5.1
    • Affects Version/s: 1.4.1
    • Component/s: Replication
    • None
    • Environment:

      david@stelmaria ~/mongodb: bin-1.4.1/bin/mongo sd
      MongoDB shell version: 1.4.1
      url: sd
      connecting to: sd
      type "help" for help
      > db.getMongo().setSlaveOk()
      > db.sd_boxedice_servers.find()

      { "_id" : ObjectId("4ba21e738ead0e5346e90300"), "sId" : 50, "tA" : "Thu Mar 18 2010 12:37:07 GMT+0000 (UTC)", "ip" : "173.203.108.233", "nm" : "potter.boxedice.net", "grp" : "", "loc" : "ORD1, Chicago, USA", "prv" : "Rackspace Cloud", "notes" : "", "cpuCores" : "4", "installedRAM" : 265, "swapSpace" : 511, "aK" : "2a52169de1b251b6b8c50f9f272cf6bf", "iH" : "potter.boxedice.net", "os" : "linux" }

      > db.stats()
      {
      "collections" : 0,
      "objects" : 0,
      "dataSize" : 0,
      "storageSize" : 0,
      "numExtents" : 0,
      "indexes" : 0,
      "indexSize" : 0,
      "ok" : 1
      }
      >

      Works fine on the master. Does not work on the slave in a replica pair.

      Started with:

      ./bin-1.4.1/bin/mongod --dbpath data-1.2/ --quiet --fork --logpath log-1.4.1.log --nohttpinterface --oplogSize=75000 --pairwith internal.asriel.boxedice.net

            Assignee:
            eliot Eliot Horowitz (Inactive)
            Reporter:
            boxedice David Mytton
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: