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

validate_collections.js hook should report node that failed validation

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.0.0-rc0
    • Affects Version/s: None
    • Component/s: Testing Infrastructure
    • None
    • Fully Compatible
    • TIG 2018-05-07
    • 1

      When reporting a failure, it can be hard to trace back which node the validation failed on. E.g:

      [ValidateCollections:job14:explain5:ValidateCollections] 2018-03-29T16:03:00.107+0000 connecting to: mongodb://localhost:23500,localhost:23501,localhost:23502/?replicaSet=rs
      [ValidateCollections:job14:explain5:ValidateCollections] 2018-03-29T16:03:00.125+0000 Collection validation failed with response: {
      [ValidateCollections:job14:explain5:ValidateCollections] 2018-03-29T16:03:00.134+0000 	"ns" : "config.transactions",
      [ValidateCollections:job14:explain5:ValidateCollections] 2018-03-29T16:03:00.134+0000 	"nInvalidDocuments" : NumberLong(0),
      [ValidateCollections:job14:explain5:ValidateCollections] 2018-03-29T16:03:00.163+0000 	"nrecords" : 8,
      [ValidateCollections:job14:explain5:ValidateCollections] 2018-03-29T16:03:00.164+0000 	"nIndexes" : 1,
      [ValidateCollections:job14:explain5:ValidateCollections] 2018-03-29T16:03:00.187+0000 	"keysPerIndex" : {
      [ValidateCollections:job14:explain5:ValidateCollections] 2018-03-29T16:03:00.189+0000 		"config.transactions.$_id_" : 9
      [ValidateCollections:job14:explain5:ValidateCollections] 2018-03-29T16:03:00.191+0000 	},
      [ValidateCollections:job14:explain5:ValidateCollections] 2018-03-29T16:03:00.208+0000 	"indexDetails" : {
      [ValidateCollections:job14:explain5:ValidateCollections] 2018-03-29T16:03:00.210+0000 		"config.transactions.$_id_" : {
      [ValidateCollections:job14:explain5:ValidateCollections] 2018-03-29T16:03:00.211+0000 			"valid" : false
      [ValidateCollections:job14:explain5:ValidateCollections] 2018-03-29T16:03:00.214+0000 		}
      [ValidateCollections:job14:explain5:ValidateCollections] 2018-03-29T16:03:00.232+0000 	},
      [ValidateCollections:job14:explain5:ValidateCollections] 2018-03-29T16:03:00.236+0000 	"valid" : false,
      [ValidateCollections:job14:explain5:ValidateCollections] 2018-03-29T16:03:00.249+0000 	"warnings" : [ ],
      [ValidateCollections:job14:explain5:ValidateCollections] 2018-03-29T16:03:00.249+0000 	"errors" : [
      [ValidateCollections:job14:explain5:ValidateCollections] 2018-03-29T16:03:00.256+0000 		"one or more indexes contain invalid index entries."
      [ValidateCollections:job14:explain5:ValidateCollections] 2018-03-29T16:03:00.261+0000 	],
      [ValidateCollections:job14:explain5:ValidateCollections] 2018-03-29T16:03:00.300+0000 	"advice" : "A corrupt namespace has been detected. See http://dochub.mongodb.org/core/data-recovery for recovery steps.",
      [ValidateCollections:job14:explain5:ValidateCollections] 2018-03-29T16:03:00.315+0000 	"ok" : 1,
      [ValidateCollections:job14:explain5:ValidateCollections] 2018-03-29T16:03:00.320+0000 	"operationTime" : Timestamp(1522339379, 8),
      [ValidateCollections:job14:explain5:ValidateCollections] 2018-03-29T16:03:00.331+0000 	"$clusterTime" : {
      [ValidateCollections:job14:explain5:ValidateCollections] 2018-03-29T16:03:00.357+0000 		"clusterTime" : Timestamp(1522339379, 8),
      [ValidateCollections:job14:explain5:ValidateCollections] 2018-03-29T16:03:00.374+0000 		"signature" : {
      [ValidateCollections:job14:explain5:ValidateCollections] 2018-03-29T16:03:00.379+0000 			"hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
      [ValidateCollections:job14:explain5:ValidateCollections] 2018-03-29T16:03:00.391+0000 			"keyId" : NumberLong(0)
      [ValidateCollections:job14:explain5:ValidateCollections] 2018-03-29T16:03:00.401+0000 		}
      [ValidateCollections:job14:explain5:ValidateCollections] 2018-03-29T16:03:00.431+0000 	}
      [ValidateCollections:job14:explain5:ValidateCollections] 2018-03-29T16:03:00.440+0000 }
      

            Assignee:
            david.bradford@mongodb.com David Bradford (Inactive)
            Reporter:
            daniel.gottlieb@mongodb.com Daniel Gottlieb (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: