Remove BSONColumn content validation from kDefault in BSON validator

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Works as Designed
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Storage Execution
    • Storage Execution 2026-07-20
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      _validateSpecial in bson_validate.cpp:552-565 validates BSONColumn content at all modes including kDefault, throwing NonConformantBSON.Column content validation should only run at Extended/Full (for db.validate()), not kDefault. kDefault should treat BinData(7) as opaque binary like other subtypes.

      SERVER-128347 added non-bypassable column validation in checkValidation at the timeseries write path, so removing it from kDefault is safe.

      Changes:
        - Gate _doValidateColumn on non-kDefault in _validateSpecial
        - Use uassertStatusOK instead of uassert(NonConformantBSON) to preserve real error codes
        - Update bson_validate_test.cpp, bson_validate.h
        - Update jstests/noPassthrough/validate_js_generated_bson.js, jstests/disk/validate_bson_inconsistency.js,
        expression_javascript_test.cpp

      for more context see https://github.com/10gen/mongo/pull/57237/changes#r3513777467

            Assignee:
            Henrik Edin
            Reporter:
            Aditya Deshpande
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: