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

validate should check consistency of number of index entries

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 3.2.0-rc1
    • Affects Version/s: None
    • Component/s: Storage
    • None
    • Fully Compatible
    • ALL
    • Hide

      Run the jstests/core/cappedb.js test on MongoDB 3.0.4 without fix for SERVER-19513 and then run

      db.cappedb.validate() 
      
      Show
      Run the jstests/core/cappedb.js test on MongoDB 3.0.4 without fix for SERVER-19513 and then run db.cappedb.validate()
    • Quint 9 09/18/15, QuInt A (10/12/15)

      SERVER-19513 uncovered a missing check in the validate command. While the command outputs enough information to diagnose an inconsistency in the indexes, it does not mark the collection as invalid and does not report an error.

      > t.validate({full:false})
      {
      	"ns" : "test.cappedb",
      	"nrecords" : 5,
      	"nIndexes" : 1,
      	"keysPerIndex" : {
      		"test.cappedb.$_id_" : 10
      	},
      	"valid" : true,
      	"errors" : [ ],
      	"warning" : "Some checks omitted for speed. use {full:true} option to do more thorough scan.",
      	"ok" : 1
      }
      

            Assignee:
            geert.bosch@mongodb.com Geert Bosch
            Reporter:
            geert.bosch@mongodb.com Geert Bosch
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: