[SERVER-1047] db.stats() returns 0 for all counters on slave Created: 25/Apr/10  Updated: 12/Jul/16  Resolved: 25/Apr/10

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: 1.4.1
Fix Version/s: 1.5.1

Type: Bug Priority: Minor - P4
Reporter: David Mytton Assignee: Eliot Horowitz (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Thu Apr 15 20:04:41 db version v1.4.1, pdfile version 4.5
Thu Apr 15 20:04:41 git version: 5b29dec9707d50979c283057ca1b1572351eef9a
Thu Apr 15 20:04:41 sys info: Linux domU-12-31-39-06-79-A1 2.6.21.7-2.ec2.v1.2.fc8xen #1 SMP Fri Nov 20 17:48:28 EST 2009 x86_64 BOOST_LIB_VERSION=1_41
Th


Participants:

 Description   

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



 Comments   
Comment by auto [ 25/Apr/10 ]

Author:

{'login': 'erh', 'name': 'Eliot Horowitz', 'email': 'eliot@10gen.com'}

Message: helper to load collection names so not to use DBDirectClient
beter and also fixed SERVER-1047
http://github.com/mongodb/mongo/commit/0967ed4b5d06ecbd235f78e08ed62c97fb505f5b

Generated at Thu Feb 08 02:55:54 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.