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

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

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.2.0-rc0, 6.0.15, 7.0.7
    • Affects Version/s: 6.0.9
    • Component/s: None
    • None
    • Storage Execution NAMER
    • Minor Change
    • v7.0, v6.0, v5.0, v4.4
    • Execution NAMR Team 2023-10-16, Execution Team 2023-10-30, Execution Team 2023-11-13

      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

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

              Created:
              Updated:
              Resolved: