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

validate() should not return valid:false for non-compliant documents

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 7.2.0-rc0
    • 6.0.9
    • None
    • None
    • Storage Execution NAMER
    • Minor Change
    • Execution NAMR Team 2023-10-16, Execution Team 2023-10-30, Execution Team 2023-11-13

    Description

      I believe document noncompliance should be a warning, not an error, and validate() should return valid:true for a result like:

      {u'nNonCompliantDocuments': N, u'errors': [u"Detected one or more documents not compliant with the collection's schema. Check logs for log id 5363500."], u'nrecords': N, u'keysPerIndex': {...}, u'corruptRecords': [], u'advice': u'A corrupt namespace has been detected. See http://dochub.mongodb.org/core/data-recovery for recovery steps.', u'warnings': [], u'indexDetails': {...}, u'valid': False, u'extraIndexEntries': [], u'ok': 1.0, u'nInvalidDocuments': 0, u'ns': u'db.collection', u'repaired': False, u'nIndexes': N, u'missingIndexEntries': []}
      

      In sum, for this failure, I think:

      • error should be a warning
      • advice should not say "corrupt namespace"
      • valid should be true

      Attachments

        Activity

          People

            binh.vo@mongodb.com Binh Vo
            eric.sedor@mongodb.com Eric Sedor
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: