When featureCompatibilityVersion is 3.2, it should be an error to insert documents containing NumberDecimal values in legacy write mode.
Previous description:
Documents that contain NumberDecimal values can be inserted in legacy write mode. The same documents cannot be inserted when using write command mode.
var coll = db.foo; coll.drop(); // The write fails when using write commands: // "Attempt to use a decimal BSON type when support is not currently enabled." assert.writeError(coll.insert({a: NumberDecimal(2.0)})); assert.eq(coll.count(), 0); // The write succeeds when using legacy writes. db.getMongo().forceWriteMode('legacy'); coll.insert({a: NumberDecimal(2.0)}); // This assertion fails because there's a document present. assert.eq(coll.count(), 0);