Include crypt_shared / mongocryptd version in error

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Duplicate
    • Priority: Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • Not Needed
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Proposal

      Include the version of crypt_shared / mongocryptd in the error produced by libmongocrypt.

      Background & Motivation

      crypt_shared / mongocrypd produces an error on unrecognized MQL. A user connected to a new mongod / mongos server may expect new MQL to work, but get an error from crypt_shared / mongocrypd failing to process the command.

      Example scenario (see mongocryptd-too-old.py for a working example):

      • Use mongod 7.0 (supports $median)
      • Use mongocryptd 6.0 (does not support $median)
      • Gets error: Invalid $project :: caused by :: Unknown expression $median

      Consider prepending the source of this error to the message, e.g. "mongocryptd 6.0.9". That may give users a hint that their crypt_shared / mongocryptd component is too old.

      Quoting conversation with erwin.pe@mongodb.com:

      during a sync with product, the topic of programmatically ensuring that the mongo_crypt_v1.so and mongocryptd versions are compatible with the version of mongod/s that the client is connected to came up for discussion. The main motivation is that there have been several instances where people got tripped up on having a mongocryptd/shared version that don't support the newer query expressions, but got no clear indication of the root cause of the issue.

            Assignee:
            Kevin Albertson
            Reporter:
            Kevin Albertson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: