Increase mongocrypt_status_set max message length

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 1.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None

      The following python code prints 1023 instead of 10024.

          msg = b"X"*10024
          lib.mongocrypt_status_set(
              status, lib.MONGOCRYPT_STATUS_ERROR_CLIENT, 1, msg, -1)
          msg2 = _to_string(lib.mongocrypt_status_message(status, ffi.NULL))
          print(len(msg2))
      

      It appears that mongocrypt_status_set truncates the message to 1023 bytes. I propose we document this limitation or increase the max message size.

      My use case is that I want to save a python stack trace as the message. Later I want to be able to retrieve and display the full trace. 1023 is too small for a lot of failures, especially when they happen in a deeply nested function.

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

              Created:
              Updated:
              Resolved: