-
Type: Bug
-
Resolution: Fixed
-
Priority: Critical - P2
-
Affects Version/s: 4.4.0-rc9
-
Component/s: None
-
None
-
Fully Compatible
-
ALL
-
v4.4
-
Query 2020-06-29, Query 2020-07-13
This bug showed up when I was trying to run a multiversion update-fuzzer task against V4.4 and V4.2. On 4.2 we can set a non-existent dotted field to an object,
> db.fuzzer.aggregate([{$set: {"a.b": {a: 1}}}]) { "_id" : ObjectId("5ee0a7bf3fe8d86b4e667fe5"), "a" : { "b" : { "a" : 1 } } }
But on 4.4 and master, this command would somehow result in a no-op. e.g.
> db.fuzzer.find() { "_id" : ObjectId("5edfd55b7e4f068196bef40e") } > db.fuzzer.aggregate([{$set: {"a.b": {a: 1}}}]) { "_id" : ObjectId("5edfd55b7e4f068196bef40e") }
Though we can still set a non-existent simple field to an object or set a dotted field to a simple non-object value on master. e.g.
> db.fuzzer.aggregate([{$set: {"a.b": 1}}]) { "_id" : ObjectId("5edfd55b7e4f068196bef40e"), "a" : { "b" : 1 } } > db.fuzzer.aggregate([{$set: {"a": {a: 1}}}]) { "_id" : ObjectId("5edfd55b7e4f068196bef40e"), "a" : { "a" : 1 } }
- related to
-
SERVER-49310 Move computation for presence of an expression in a sub tree logic to ProjectionAST
- Closed