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

Should not enter NEED_MONGO_MARKINGS state if there is no schema

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Works as Designed
    • Icon: Minor - P4 Minor - P4
    • None
    • None
    • None
    • None

    Description

      Working with matt.broadstone on some test failures, and happened to run across something while stepping through the type=int spec test. I see the following commands being sent to be marked by mongocryptd:

      {"insert": "default", "ordered": true, "documents": [{"_id": 1, "encrypted_int": 123}], "jsonSchema": {"properties": {"encrypted_int": {"encrypt": {"keyId": [{"$binary": "AAAAAAAAAAAAAAAAAAAAAA==", "$type": "04"}], "bsonType": "int", "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic"}}}, "bsonType": "object"}, "isRemoteSchema": false}
       
      {"find": "datakeys", "filter": {"$or": [{"_id": {"$in": [{"$binary": "AAAAAAAAAAAAAAAAAAAAAA==", "$type": "04"}]}}, {"keyAltNames": {"$in": []}}]}, "jsonSchema": {}, "isRemoteSchema": true}
       
      {"find": "default", "filter": {"_id": 1}, "jsonSchema": {"properties": {"encrypted_int": {"encrypt": {"keyId": [{"$binary": "AAAAAAAAAAAAAAAAAAAAAA==", "$type": "04"}], "bsonType": "int", "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic"}}}, "bsonType": "object"}, "isRemoteSchema": false}
      

      The first and third are expected, but the second surprised me. This is the key vault query, and there is no local or remote schema for the key vault collection, so I would not expect the state machine to enter the NEED_MONGO_MARKINGS state at all.

      Attachments

        Activity

          People

            Unassigned Unassigned
            jeff.yemin@mongodb.com Jeffrey Yemin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: