Allow zero-width BSON Binary Vectors to omit metadata bytes

XMLWordPrintableJSON

    • Type: Spec Change
    • Resolution: Unresolved
    • Priority: Unknown
    • None
    • Component/s: BSON & Extended JSON
    • None
    • Not Needed

      For historical reasons (Atlas Search implementation preceeded Drivers specification), a BSON binary element with subtype "Vector" (9) may be zero-width, containing none of the bytes specified by the BSON Binary Vector specification. Critically, this omission includes the two vector metadata bytes which the spec currently mandates as always-present.

      For backward compatibility, given the server does not reject zero-width binary elements, client libraries should be permitted to allow such zero-length binary data as well. Given how niche this edge-case is, "MAY" is probably sufficient; "SHOULD" or "MUST" is likely unnecessary and may be deferred until real-world customer demands motivate Driver-wide alignment.

            Assignee:
            Unassigned
            Reporter:
            Ezra Chung
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: