|
| 1 | +C#/.NET Driver Version 1.8.2 Release Notes |
| 2 | +========================================== |
| 3 | + |
| 4 | +This is a minor release. |
| 5 | + |
| 6 | +An online version of these release notes is available at: |
| 7 | + |
| 8 | +https://github.com/mongodb/mongo-csharp-driver/blob/master/Release%20Notes/Release%20Notes%20v1.8.2.md |
| 9 | + |
| 10 | +File by file change logs are available at: |
| 11 | + |
| 12 | +https://github.com/mongodb/mongo-csharp-driver/blob/master/Release%20Notes/Change%20Log%20v1.8.2-Bson.txt |
| 13 | +https://github.com/mongodb/mongo-csharp-driver/blob/master/Release%20Notes/Change%20Log%20v1.8.2-Driver.txt |
| 14 | + |
| 15 | +The full list of JIRA issues resolved in this release is available at: |
| 16 | + |
| 17 | +https://jira.mongodb.org/secure/IssueNavigator.jspa?mode=hide&requestId=13830 |
| 18 | + |
| 19 | +Documentation on the C#/.NET driver can be found at: |
| 20 | + |
| 21 | +http://docs.mongodb.org/ecosystem/drivers/csharp/ |
| 22 | +http://api.mongodb.org/csharp/current/ |
| 23 | + |
| 24 | +BSON Library Changes |
| 25 | +==================== |
| 26 | + |
| 27 | +Performance improvements |
| 28 | +------------------------ |
| 29 | + |
| 30 | +Serialization and deserialization of enumerable types that serialize to BSON |
| 31 | +arrays has been sped up. The serializer for the nominal type is only looked |
| 32 | +up once, and when using polymorphic types, the actual serializer only has to |
| 33 | +be looked up when the actual type changes so runs of identical subtypes are |
| 34 | +handled more efficiently. |
| 35 | + |
| 36 | +WriteCString error checking |
| 37 | +--------------------------- |
| 38 | + |
| 39 | +The BSON spec does not allow CStrings to have embedded nulls. The driver now |
| 40 | +enforces this restriction thoroughly. |
| 41 | + |
| 42 | +BsonMemberMaps are now frozen when BsonClassMap is frozen |
| 43 | +--------------------------------------------------------- |
| 44 | + |
| 45 | +The BsonMemberMap now has a Freeze method, and BsonClassMap now calls Freeze |
| 46 | +on all the member maps when the Freeze is called on the class map. |
| 47 | + |
| 48 | +Better support for mutable default values |
| 49 | +----------------------------------------- |
| 50 | + |
| 51 | +A default value for mutable types is vulnerable to being altered by the |
| 52 | +application, which would affect future uses of the default value. When using |
| 53 | +a mutable type we really need a new instance of the default value every time. |
| 54 | +There is now a new overload of SetDefaultValue that allows you to provide a |
| 55 | +creator function instead of a value, so the creator function can instantiate |
| 56 | +a new instance of the default value each time one is needed. |
| 57 | + |
| 58 | +Driver Changes |
| 59 | +============== |
| 60 | + |
| 61 | +Improved tracking of the primary for replica sets |
| 62 | +------------------------------------------------- |
| 63 | + |
| 64 | +Tracking of the current primary for replica sets has been made more reliable. |
| 65 | +There were certain scenarios in which the driver might have two members |
| 66 | +marked as being the current primary. With these changes there is a single |
| 67 | +field that tracks the most recently seen primary so by definition there will |
| 68 | +never be more than one. |
| 69 | + |
| 70 | +Internal restructuring |
| 71 | +---------------------- |
| 72 | + |
| 73 | +Some changes were made to the internal implementation of the driver which do |
| 74 | +not affect the public API. There is a new set of operation classes that |
| 75 | +encapsulate the handling of wire protocol messages and some logic that used |
| 76 | +to exist in MongoCollection has been moved to the operations. In addition, |
| 77 | +the way commands are run has been refactored somewhat. |
| 78 | + |
| 79 | +IndexCache removed |
| 80 | +------------------ |
| 81 | + |
| 82 | +In the past drivers and the mongo shell kept track of calls to EnsureIndex in |
| 83 | +order to optimize away additional round trips to the server for the same index. |
| 84 | +But this approach has inherent problems, one of which is that it can't see |
| 85 | +any changes made to the indexes by other processes. Therefore, the driver |
| 86 | +no longer tracks calls to EnsureIndex and all calls to EnsureIndex are sent to |
| 87 | +the server and it is up to the server to decide if the index already exists or |
| 88 | +not. Typically this will not cause any backward compatibility problems and |
| 89 | +the performance hit will be very small (unless you were calling EnsureIndex |
| 90 | +very frequently). |
0 commit comments