Automatic encryption unnecessarily requests listCollections on a collection with no JSON schema configured.
libmongocrypt checks if a collection has a JSON schema configured by doing the following:
1. Checks if there is an entry in the locally configured schema map.
2. Checks if there is a cached schema obtained from a previous listCollections reply.
libmongocrypt will cache the response for a collection that does not have a JSON schema configured.
https://github.com/mongodb/libmongocrypt/blob/91d2a11bea3569d46001a3a3ef57161bd3706eab/src/mongocrypt-ctx-encrypt.c#L104
However, the check for a cached response does not account for collections that have no schema configured. The absense of a configured schema should still be cached.
https://github.com/mongodb/libmongocrypt/blob/91d2a11bea3569d46001a3a3ef57161bd3706eab/src/mongocrypt-ctx-encrypt.c#L895
This results in drivers repeatedly requesting listCollections unnecessarily.
- is depended on by
-
PYTHON-2909 [pymongocrypt] Bundle libmongocrypt 1.2.2
- Closed
- is related to
-
NODE-3262 CSFLE performance issue (10x times slower)
- Closed