-
Type:
Task
-
Resolution: Won't Do
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Replication
-
None
-
None
-
None
-
None
-
None
-
None
-
None
In SERVER-30470, we discovered a bug where field ordering was not preserved when a specific series of oplog entries are applied. Although that bug was resolved after SERVER-50300, we should audit our tests to see if we have field ordering test coverage, and if not, we should create a new jscore test that covers this. The specific ordering of entries in SERVER-30470 that caused an issue was:
Starting with a document { _id: 1, a: 0 };
Apply: o: { $unset: { a: null } }
==> { _id: 1 };
Apply: o: { $set: { 'a.c': 1, b: null } }
==> { _id: 1, a: { c: 1 }, b: null };
// Applying the updates again:
Apply: o: { $unset: { a: null } }
==> { _id: 1, b: null };
Apply: o: { $set: { 'a.c': 1, b: null } }
==> { _id: 1, b: null, a: { c: 1 } };
This came out of a discussion for mongosync regarding field ordering test coverage