Uploaded image for project: 'Libmongocrypt'
  1. Libmongocrypt
  2. MONGOCRYPT-167

Increase mongocrypt_status_set max message length

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

      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@mongodb.com Kevin Albertson
            Reporter:
            shane.harvey@mongodb.com Shane Harvey
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: