Skip to content

Commit 6160a2a

Browse files
author
rstam
committed
Minor edits of the 1.4 Release Notes.
1 parent 393d4d7 commit 6160a2a

File tree

1 file changed

+25
-24
lines changed

1 file changed

+25
-24
lines changed

Release Notes/Release Notes v1.4.md

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ BsonIgnoreIfDefault attribute
104104
-----------------------------
105105

106106
This new attribute allows you to specify that you want a field to be ignored
107-
during serialization if it has the default value. This replaces the
107+
during serialization if it is equal to the default value. This replaces the
108108
SerializeDefaultValue parameter of the BsonDefaultValue attribute. By making
109109
this a separate attribute you can specify that you want the default value
110110
ignored without having to specify the default value as well.
@@ -146,7 +146,7 @@ to be used to store any extra elements encountered during deserialization.
146146
However, this field *had* to be of type BsonDocument, which meant introducing
147147
a dependency on the driver into your data model classes (which some developers
148148
don't want to do). You now have the additional option of declaring your
149-
ExtraElements field to be of type IDictionary<string, object> instead.
149+
ExtraElements field to be of type IDictionary\<string, object\> instead.
150150

151151
IBsonSerializationOptions
152152
-------------------------
@@ -182,7 +182,7 @@ ISupportInitialize
182182
The ISupportInitialize interface defines two methods: BeginInit and EndInit.
183183
The BsonClassMapSerializer now checks whether the class being deserialized
184184
implements this interface, and if so, calls BeginInit just before it starts
185-
to deserialize a value, and EndInit just after it has finished. You can
185+
to deserialize a class, and EndInit just after it has finished. You can
186186
use this feature to do any pre- or post-processing.
187187

188188
ObjectId/BsonObjectId creation
@@ -196,7 +196,9 @@ which case you will usually set the machine, pid and increment fields to zero).
196196

197197
There are also two new overloads of GenerateNewId that allow you to provide
198198
the desired timestamp as either an int or a .NET DateTime. These new overloads
199-
are useful if you need to create backdated ObjectIds.
199+
are useful if you need to create backdated ObjectIds. When generating backdated
200+
ObjectIds there is a slight risk that you might create an ObjectId that is
201+
not unique (but that risk is very small).
200202

201203
TimeSpanSerializationOptions
202204
----------------------------
@@ -214,7 +216,7 @@ Authentication support improved
214216
-------------------------------
215217

216218
Operations that require admin credentials previously required you to set the
217-
DefaultCredentials of MongoServerSettting to admin credentials. But that is
219+
DefaultCredentials of MongoServerSetttings to admin credentials. But that is
218220
undesirable because it provides the client code full access to all databases,
219221
essentially negating the benefit of using authentication in the first place.
220222
In the 1.4 release all operations that require admin credentials have a new
@@ -229,8 +231,8 @@ The default value of WaitQueueMultiple has been changed from 1.0 to 5.0 and the
229231
default value of WaitQueueTimeout has been changed from 0.5 seconds to 2
230232
minutes. These new values are taken from the Java driver, where they have
231233
reportedly been working well for users running under heavy loads. These new
232-
values mean that many more threads can be waiting for a lot longer time
233-
before a timeout occurs and an exception is thrown.
234+
values mean that many more threads can be waiting for a longer time before a
235+
timeout exception is thrown.
234236

235237
Exceptions are no longer caught and rethrown when possible
236238
----------------------------------------------------------
@@ -245,14 +247,14 @@ IBsonSerializable semi-deprecated
245247
---------------------------------
246248

247249
The LINQ support relies heavily on the new methods added to IBsonSerializer.
248-
Because of this it is highly encouraged that in the future you always opt to
249-
write an IBsonSerializer for your class instead of having it implement
250-
IBsonSerializable (see the notes for MongoDBRef and SystemProfileInfo for
251-
examples of where the driver itself has switched from IBsonSerializable to
252-
using a IBsonSerializer). IBsonSerializable still has a modest role to play
253-
in classes that just need to be serialized quickly and simply and for which we
254-
won't be writing LINQ queries (for example, the driver's Builders and Wrappers
255-
still use IBsonSerializable).
250+
Because of this it is highly encouraged that *if* you have to handle your own
251+
serialization that you always opt to write an IBsonSerializer for your class
252+
instead of having it implement IBsonSerializable (see the notes for MongoDBRef
253+
and SystemProfileInfo for examples of where the driver itself has switched
254+
from IBsonSerializable to using a IBsonSerializer). IBsonSerializable still
255+
has a modest role to play in classes that just need to be serialized quickly
256+
and simply and for which we won't be writing LINQ queries (for example, the
257+
driver's Builders and Wrappers still use IBsonSerializable).
256258

257259
LINQ query support
258260
------------------
@@ -286,9 +288,8 @@ MongoDBRef used to handle its own serialization by virtue of implementing
286288
IBsonSerializable. But the IBsonSerializable interface is not helpful when we
287289
try to add support for writing LINQ queries against components of a MongoDBRef.
288290
Instead, there is now a MongoDBRefSerializer which handles serialization of
289-
MongoDBRefs, while at the same time implementing GetMemberSerializationInfo
290-
which enables the LINQ implementation to support LINQ queries against
291-
MongoDBRefs.
291+
MongoDBRefs, as well as implementing GetMemberSerializationInfo which enables
292+
the LINQ implementation to support LINQ queries against MongoDBRefs.
292293

293294
MongoInsertOptions/MongoUpdateOptions constructor changed
294295
---------------------------------------------------------
@@ -312,7 +313,7 @@ and adding new overloads for providing admin credentials would have resulted
312313
in even more of these rarely used properties and methods. If you were using
313314
any of these methods or properties they can easily be replaced with calls to
314315
methods of an instance of MongoDatabase (use one of the overloads of
315-
GetDatabase with "admin" as the database to get a reference to the admin
316+
GetDatabase with "admin" as the database name to get a reference to the admin
316317
database).
317318

318319
RequestStart/RequestDone
@@ -323,7 +324,7 @@ operations should all be done using the same connection (which in the case of a
323324
replica set also implies using the same member of the connection set). Which
324325
member of a replica set was chosen depended on the slaveOk parameter: a value
325326
of false meant that the primary had to be used, and a value of true meant that
326-
an arbitrary secondary would be used. A new overload of RequestStart now allows
327+
an arbitrary secondary could be used. A new overload of RequestStart now allows
327328
the caller to specify which member should be used, which can be very useful for
328329
implementing custom query routing algorithms or for querying specific members
329330
of a replica set. In general though, keep in mind that you should *not* be
@@ -334,10 +335,10 @@ SocketTimeout default changed
334335

335336
The default value for SocketTimeout has been changed from 30 seconds to 0,
336337
which is a special value meaning to use the operating system default value,
337-
which in turn is infinity. If you actually wanted a SocketTimeout you now
338-
have to set it yourself. The SocketTimeout is currently a server setting, but
339-
most likely in a future release it will be possible to set it at the
340-
individual operation level.
338+
which in turn is infinity. If you actually want a SocketTimeout you now
339+
have to set it yourself. The SocketTimeout is currently a server level setting,
340+
but most likely in a future release it will be possible to set it at other
341+
levels, including for individual operations.
341342

342343
SystemProfileInfo no longer implements IBsonSerializable
343344
--------------------------------------------------------

0 commit comments

Comments
 (0)