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

db.collection.stats() creates invalid document issued on a MongoS to an un-sharded collection

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Usability
    • Labels:
      None
    • Sharding
    • ALL
    • Hide

      From any mongos issue db.collection.stats() on an unsharded collection.

      Eg:

      > db.t2.stats()
      {
      	"sharded" : false,
      	"primary" : "shard01",
      	"ok" : 0,
      	"errmsg" : "Database [bar] not found.",
      	"$gleStats" : {
      		"lastOpTime" : Timestamp(0, 0),
      		"electionId" : ObjectId("5486a19daf76718dcc4f53ce")
      	}
      }
      
      Show
      From any mongos issue db.collection.stats() on an unsharded collection. Eg: > db.t2.stats() { "sharded" : false , "primary" : "shard01" , "ok" : 0, "errmsg" : "Database [bar] not found." , "$gleStats" : { "lastOpTime" : Timestamp(0, 0), "electionId" : ObjectId( "5486a19daf76718dcc4f53ce" ) } }

      As part of SERVER-12419, we created a new field name called "$gleStats".

      The leading $ sign on the field name breaks the document conventions. This means that end users cannot take the output of db.collection.stats() on a MongoS and re-insert it or perform other operations with this output.

            Assignee:
            backlog-server-sharding [DO NOT USE] Backlog - Sharding Team
            Reporter:
            david.hows David Hows
            Votes:
            4 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: