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

full validation attempts to fix up multikey on read-only server

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.2.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Fully Compatible
    • ALL
    • Execution Team 2021-11-29, Execution Team 2021-12-13
    • 15

      In SERVER-53675, we provided the ability to fix up invalid multikey index information in the collection metadata through the validate command. On a server configured for read-only access, the validate command would still attempt to fix up the metadata on detecting a multikey inconsistency. This results in a failed validation command with the following error:

      > db.getSiblingDB('db_1').two.validate({full: true})
      {
      	"ns" : "db_1.two",
      	"nInvalidDocuments" : 0,
      	"nrecords" : 3,
      	"valid" : false,
      	"repaired" : false,
      	"warnings" : [ ],
      	"errors" : [
      		"exception during collection validation: IllegalOperation: Cannot execute a write operation in read-only mode"
      	],
      	"extraIndexEntries" : [ ],
      	"missingIndexEntries" : [ ],
      	"corruptRecords" : [ ],
      	"advice" : "A corrupt namespace has been detected. See http://dochub.mongodb.org/core/data-recovery for recovery steps.",
      	"ok" : 1
      }
      

      We should revisit the condition in the validation code that allows metadata fix-ups to proceed on a read-only server.

            Assignee:
            daniel.gomezferro@mongodb.com Daniel Gomez Ferro
            Reporter:
            benety.goh@mongodb.com Benety Goh
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: