Details
-
Improvement
-
Resolution: Won't Fix
-
Minor - P4
-
None
-
None
-
Not Needed
Description
Summary
Top-level dollar signs are not supported in mongodb versions < 4.2, per the legacy documentation. A recent change to key management API (in DRIVERS-2017) added a dependency on aggregation pipeline style update operators which are not supported until 4.2. Apps that attempt to use removeKeyAltName() on MongoDB <4.2 will receive a cryptic error like this:
The dollar ($) prefixed field '$set' in '0.$set' is not valid for storage.
|
This particular error will occur when running something like the following for a mongodb version < 4.2:
def remove_alt_name(name):
|
return coll.find_one_and_update({"keyAltNames": name}, [{"$set": { "x": 1 }}])
|
One potential update could ensure the resulting error reads
FLE requires mongodb version 4.2+: The dollar ($) prefixed field '$set' in '0.$set' is not valid for storage.
|
Motivation
Who is the affected end user?
Anyone using version < 4.2 for aggregating data.
How does this affect the end user?
Cosmetic, clearer error messages for resolution.