Skip to content

Commit 30c9e36

Browse files
mongoKartrachel-mack
authored andcommitted
rm/cc feedback
1 parent 6353496 commit 30c9e36

File tree

1 file changed

+59
-25
lines changed

1 file changed

+59
-25
lines changed

source/upgrade.txt

Lines changed: 59 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -61,32 +61,41 @@ the version after v4.0 including any listed under v4.5.
6161
Version 5.0 Breaking Changes
6262
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6363

64+
<<<<<<< HEAD
6465
- This driver version introduces the following changes to the ``ConnectionId`` class:
6566

6667
- The ``ConnectionId`` constructor now accepts a value of type ``long`` as its second
6768
parameter instead of type ``int``. Similarly, the constructor now accepts a value of
6869
type ``Long`` as its third parameter instead of type ``Integer``. Because this change breaks
6970
binary compatibility, recompile any existing code that calls the ``ConnectionId`` constructor.
70-
71-
- The ``withServerValue()`` method now accepts a parameter of type ``long`` rather than
72-
type ``int``. This change breaks binary compatibility, so you must recompile any code
73-
that calls the ``withServerValue()`` method.
71+
=======
72+
This driver version introduces the following breaking changes:
73+
>>>>>>> 5700e72 (rm/cc feedback)
74+
75+
- Changes the data type of the timeout duration parameter in the
76+
``SocketSettings.Builder.connectTimeout()`` and ``SocketSettings.Builder.readTimeout()``
77+
methods. The data type of this parameter is now ``long`` instead of ``int``.
78+
To view an
79+
example that shows how to instantiate a ``SocketSettings`` instance by using
80+
these methods, see the :ref:`SocketSettings Example
81+
<java-socketsettings-example>` in the Specify MongoClient Settings
82+
guide.
7483

7584
- The ``getServerValue()`` method now returns a value of type ``Long`` instead of type
7685
``Integer``. Similarly, the ``getLocalValue()`` method returns a value of type
7786
``long`` instead of type ``int``. Because this change breaks both binary and source
7887
compatibility, update any source code that uses these methods and rebuild your binary.
7988

80-
- The following record annotations from the
81-
``org.bson.codecs.record.annotations`` package are replaced with
89+
- Removes the following record annotations from the
90+
``org.bson.codecs.record.annotations`` package are replaces them with
8291
annotations of the same name from the ``org.bson.codecs.pojo.annotations`` package:
8392

8493
- ``BsonId``
8594
- ``BsonProperty``
8695
- ``BsonRepresentation``
8796

88-
- You must pass a timeout duration, which is the first parameter, to the
89-
following ``SocketSettings`` builder methods as a ``long`` type:
97+
- Requires the timeout parameter to be passed to the
98+
following ``SocketSettings`` builder methods as a ``long`` types:
9099

91100
- ``connectTimeout()``
92101
- ``readTimeout()``
@@ -99,7 +108,7 @@ Version 5.0 Breaking Changes
99108
This change breaks binary compatibility (requires recompiling) but does not
100109
require code changes.
101110

102-
- This driver version removes the ``Filters.eqFull()`` method, released
111+
- Removes the ``Filters.eqFull()`` method, released
103112
exclusively in ``Beta``, which allowed you
104113
to construct an equality filter when performing a vector search.
105114
You can use the ``Filters.eq()`` method when instantiating a
@@ -119,9 +128,10 @@ Version 5.0 Breaking Changes
119128
``org.mongodb.scala.Observable[Void]``.
120129

121130
.. After the 5.0 Scala API docs are released, this line will be uncommented.
131+
122132
For more information, see the `Observable trait documentation <https://mongodb.github.io/mongo-java-driver/5.0/apidocs/mongo-scala-driver/org/mongodb/scala/Observable.html>`__.
123133

124-
- This driver changes how ``ClusterSettings`` computes
134+
- Changes how ``ClusterSettings`` computes
125135
``ClusterConnectionMode``, making it more consistent by using the specified
126136
replica set name, regardless of how it is configured. Previously, replica set
127137
name was only considered if it was set by the connection string.
@@ -147,34 +157,35 @@ Version 5.0 Breaking Changes
147157
.build()
148158
.getMode()
149159

150-
- This driver changes how ``BsonDecimal128`` values respond to method calls, by
160+
- Changes how ``BsonDecimal128`` values respond to method calls, by
151161
responding in the same way as ``Decimal128`` values. In particular,
152162
``BsonDecimal128.isNumber()`` now returns ``true``, and
153163
``BsonDecimal128.asNumber()`` returns the equivalent ``BsonNumber``.
154-
- This driver version removes the ``Parameterizable`` interface. Instead of
164+
165+
- Removes the ``Parameterizable`` interface. Instead of
155166
implementing this interface on a custom ``Codec`` type,
156167
override the ``CodecProvider.get()`` method on the
157168
codec's ``CodecProvider`` if the codec is intended for a parameterized
158169
type.
159170

160-
- This driver version removes the ``isSlaveOk()`` method from the
171+
- Removes the ``isSlaveOk()`` method from the
161172
``ReadPreference`` and ``TaggableReadPreference`` classes. To check whether a read preference allows
162173
reading from a secondary member of a replica set, use the ``isSecondaryOk()`` methods from
163174
these classes instead.
164175

165-
- This driver version removes the ``DBCollection.getStats()`` and ``DBCollection.isCapped()``
176+
- Removes the ``DBCollection.getStats()`` and ``DBCollection.isCapped()``
166177
helper methods for the ``collStats`` command. Instead of these methods, you can use the
167178
``$collStats`` aggregation pipeline stage. For an example of how to use this pipeline
168179
stage, see :manual:`What's New <java-deprecations-4.11>` for v4.11 of the {+driver-short+}.
169180

170-
- This driver version removes the ``IterableCodec`` and ``MapCodec`` types.
171-
Use ``MapCodecProvider`` instead of ``MapCodec`` and ``CollectionCodecProvider``
181+
- Removes the ``IterableCodec`` and ``MapCodec`` types.
182+
Use ``MapCodecProvider`` instead of ``MapCodec``, and ``CollectionCodecProvider``
172183
instead of ``IterableCodec``.
173184

174-
- This driver version removes the ``sharded`` and ``nonAtomic`` options from the
185+
- Removes the ``sharded`` and ``nonAtomic`` options from the
175186
``MapReducePublisher`` and ``MapReduceIterable`` classes.
176187

177-
- This driver version removes the following methods for use with ``geoHaystack`` indexes:
188+
- Removes the following methods for use with ``geoHaystack`` indexes:
178189

179190
- ``Indexes.geoHaystack()``
180191
- ``IndexOptions.getBucketSize()``
@@ -184,7 +195,7 @@ Version 5.0 Breaking Changes
184195
query operator on a 2d index. For more information, see the
185196
:manual:`Geospatial Queries page </geospatial-queries>` in the {+mdb-server+} manual.
186197

187-
- This driver version removes the ``oplogReplay`` option from find operations. This
198+
- Removes the ``oplogReplay`` option from find operations. This
188199
includes the following methods:
189200

190201
- ``DBCursor.oplogReplay()``
@@ -193,28 +204,27 @@ Version 5.0 Breaking Changes
193204
- ``FindPublisher.oplogReplay()``
194205
- ``FindIterable.oplogReplay()``
195206

196-
- This driver version removes the following ``Exception`` constructors:
207+
- Removes the following ``Exception`` constructors:
197208

198209
- ``MongoBulkWriteException(BulkWriteResult, List<BulkWriteError>, WriteConcernError, ServerAddress)``
199210
- ``MongoCursorNotFoundException(long, ServerAddress)``
200211
- ``MongoQueryException(ServerAddress, int, String)``
201212
- ``MongoQueryException(ServerAddress, int, String, String)``
202213
- ``MongoQueryException(MongoCommandException)``
203214

204-
- This driver version removes the following overloads for the
205-
``BulkWriteResult.acknowledged()`` method:
215+
- Removes the following overloads for the ``BulkWriteResult.acknowledged()`` method:
206216

207217
- ``acknowledged(Type, int, List<BulkWriteUpsert>)``
208218
- ``acknowledged(Type, int, Integer, List<BulkWriteUpsert>)``
209219
- ``acknowledged(int, int, int, Integer, List<BulkWriteUpsert>)<String>)``
210220

211-
- This driver version removes the following ``ChangeStreamDocument`` constructors:
221+
- Removes the following ``ChangeStreamDocument`` constructors:
212222

213223
- ``ChangeStreamDocument(String, BsonDocument, BsonDocument, BsonDocument, TDocument, TDocument, BsonDocument, ...)``
214224
- ``ChangeStreamDocument(String, BsonDocument, BsonDocument, BsonDocument, TDocument, BsonDocument, BsonTimestamp, ...)``
215225
- ``ChangeStreamDocument(OperationType, BsonDocument, BsonDocument, BsonDocument, TDocument, BsonDocument, BsonTimestamp, ...)``
216226

217-
- This driver version removes the following constructors for events:
227+
- Removes the following constructors for events:
218228

219229
- ``CommandEvent(RequestContext, int, ConnectionDescription, String)``
220230
- ``CommandEvent(int, ConnectionDescription, String)``
@@ -235,11 +245,35 @@ Version 5.0 Breaking Changes
235245
- ``ServerHeartbeatFailedEvent(ConnectionId, long, Throwable)``
236246
- ``ServerHeartbeatSucceededEvent(ConnectionId, BsonDocument, long)``
237247

238-
- This driver version removes the ``errorLabels`` option from the ``WriteConcernError``
248+
- Removes the ``errorLabels`` option from the ``WriteConcernError``
239249
class. This includes the ``addLabel()`` and ``getErrorLabels()`` methods and the
240250
constructor that includes an ``errorLabels`` parameter. Instead, you can use
241251
the error labels included in the top-level response document.
242252

253+
- Removes the
254+
``org.mongodb.scala.ObservableImplicits.ToSingleObservableVoid`` implicit
255+
class from the Scala driver package. This means the
256+
``org.reactivestreams.Publisher[Void]`` type no longer
257+
converts automatically to ``org.mongodb.scala.SingleObservable[Void]``. The
258+
API also exposes ``org.mongodb.scala.Observable[Unit]`` instead of
259+
``org.mongodb.scala.Observable[Void]``.
260+
261+
- Introduces the following changes to the ``ConnectionId`` class:
262+
263+
- The ``ConnectionId`` constructor now accepts a value of type ``long`` as its second
264+
parameter instead of type ``int``. Similarly, the constructor now accepts a value of
265+
type ``Long`` as its third parameter instead of type ``Integer``. Because this change breaks
266+
binary compatibility, recompile any existing code that calls the ``ConnectionId`` constructor.
267+
268+
- The ``withServerValue()`` method now accepts a parameter of type ``long`` rather than
269+
type ``int``. This change breaks binary compatibility, so you must recompile any code
270+
that calls the ``withServerValue()`` method.
271+
272+
- The ``getServerValue()`` method now returns a value of type ``Long`` instead of type
273+
``Integer``. Similarly, the ``getLocalValue()`` method returns a value of type
274+
``long`` instead of type ``int``. Because this change breaks both binary and source
275+
compatibility, update any source code that uses these methods and rebuild your binary.
276+
243277
.. _java-breaking-changes-v4.8:
244278

245279
Version 4.8 Breaking Changes

0 commit comments

Comments
 (0)