-
Type: Bug
-
Resolution: Done
-
Priority: Minor - P4
-
Affects Version/s: 1.5
-
Component/s: None
-
None
-
Minor Change
The C# driver uses
{ $csharpnull : true }to represent a BsonNull property whose value is C# null. For example:
public class C { public BsonNull a; public BsonNull b; } var c = new C { a = BsonNull.Value, b = null }; Console.WriteLine(c.ToJson());
results in:
{ "a" : null, "b" : { "$csharpnull" : true } }
The C# driver needs to use some other representation for BsonNull values of C# null because this representation either causes replication to halt (prior to server 2.2) or the secondaries to crash (in server 2.2 rc0 and rc1).
This is also a server bug, in the sense that no value that a client driver provides should be allowed to halt replication or crash secondaries. If the server considers this representation to be invalid then it should have been rejected outright by the primary.
- related to
-
SERVER-6833 Secondary crashes when replicating a document that the primary accepted (with a field name containing a "$")
- Closed