Skip to content

Commit f25a642

Browse files
kennethdyerltran-mdb2jddubois
authored
DOCSP-36932 RN for 1.7.2 (#265)
* DOCSP-35932 RN for 1.7.2 * Fixes per Johnny DuBois * Fixes per Johnny DuBois * Additiona 1.7.2 changes * Fixes per Evgeni * Fixes per Evgeni * Fixes per Evgeni * Fixes per Evgeni * Fixes per Evgeni * Fixes per Evgeni * Fixes orphan warning * Fixes orphan warning * Apply suggestions from code review Fixes per Lauren Co-authored-by: ltran-mdb2 <[email protected]> * Fixes per Lauren Co-authored-by: ltran-mdb2 <[email protected]> * Fixes per Lauren * Fixes per Lauren * Fixes per Johnny DuBois * Fixes per Johnny DuBois * Fixes per Johnny DuBois * Fixes per Johnny DuBois * Fixes per Johnny DuBois * Fixes per Johnny DuBois * Fixes per Johnny DuBois * Fixes per Johnny DuBois * Fixes per Johnny DuBois Co-authored-by: John DuBois <[email protected]> * Fixes per Johnny DuBois * fixes per Tim * fixes per Tim * fixes per Tim --------- Co-authored-by: ltran-mdb2 <[email protected]> Co-authored-by: John DuBois <[email protected]>
1 parent 99533d8 commit f25a642

File tree

7 files changed

+111
-31
lines changed

7 files changed

+111
-31
lines changed

source/includes/fact-oplog-background.rst

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,14 @@ on the source cluster, the sync fails and ``mongosync`` exits.
88

99
.. include:: /includes/fact-applyOps.rst
1010

11-
Starting in version 1.5.0, ``mongosync`` enables Oplog Rollover
12-
Resilience (ORR). With ORR, ``mongosync`` applies changes on the
13-
source cluster to the destination cluster during the initial sync. ORR
14-
increases the resilience of ``mongosync`` to oplog rollover but does not
15-
prevent rollover entirely.
16-
17-
You might exceed the oplog window if you:
18-
19-
- Sync from a high write rate source cluster for an extended
20-
period.
21-
- Pause sync for an extended period.
22-
23-
To increase the size of the ``oplog`` on the source cluster, use
24-
:setting:`~replication.oplogSizeMB`. For more information, see
25-
:ref:`Change Oplog Size <tutorial-change-oplog-size>` and
26-
:ref:`Workloads that Might Requre a Large Oplog Size
27-
<replica-set-large-oplog-required>`.
28-
11+
During the initial sync, ``mongosync`` may apply operations at a slower
12+
rate due to copying documents concurrently.
13+
After the initial sync, ``mongosync`` applies changes
14+
faster and is more likely to maintain a position in the ``oplog``
15+
that is close to the real-time writes occurring on the source cluster.
16+
17+
If you anticipate syncing a large data set, or if you plan to pause
18+
synchronization for an extended period of time, you might exceed the
19+
:term:`oplog window`. Use the :setting:`~replication.oplogSizeMB` setting
20+
to increase the size of the ``oplog`` on the source cluster.
2921

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
You can also specify read preference on a per-connection basis in the
2-
connection string. By default, ``mongosync`` sets the source cluster
3-
read preference to :readmode:`nearest` to distribute reads evenly across
4-
nodes. For more information on setting read preference in connection
5-
strings, see :ref:`connections-read-preference`.
1+
2+
``mongosync`` requires the :readmode:`primary` read preference
3+
to connect to the source cluster. For more information, see :ref:`connections-read-preference`.
4+

source/multiple-mongosyncs.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ There are two ways to synchronize :ref:`sharded clusters
1818
loaded clusters, use one ``mongosync`` instance for each shard on the
1919
source cluster.
2020

21+
.. important::
22+
23+
When the source cluster is a sharded cluster, stop the
24+
balancer and don't run the :dbcommand:`moveChunk` or
25+
:dbcommand:`moveRange` commands until ``mongosync`` reaches
26+
the collection copy phase.
27+
2128
.. _c2c-sharded-config-single:
2229

2330
Configure a Single ``mongosync`` Instance

source/reference/limitations.txt

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ General Limitations
5252
- .. include:: /includes/fact-atlas-require-indexes-limitation.rst
5353
- ``mongosync`` doesn't sync users or roles.
5454
- .. include:: /includes/fact-applyOps.rst
55+
- ``mongosync`` must read from the source cluster using the
56+
:readmode:`primary` read preference.
57+
5558

5659
MongoDB Community Edition
5760
-------------------------
@@ -107,11 +110,22 @@ Sharded Clusters
107110
- ``mongosync`` only syncs indexes that have consistent index
108111
specifications on all shards.
109112

110-
.. note::
113+
.. note::
114+
115+
To check for index inconsistencies, see :ref:`Find Inconsistent
116+
Indexes Across Shards <manage-indexes-find-inconsistent-indexes>`.
117+
118+
- You must stop the balancer on a sharded source cluster until
119+
mongosync finishes the collection copy phase.
120+
121+
.. note::
111122

112-
To check for index inconsistencies, see :ref:`Find Inconsistent
113-
Indexes Across Shards <manage-indexes-find-inconsistent-indexes>`.
123+
After stopping the balancer, wait fifteen minutes before
124+
starting ``mongosync``. This gives the cluster time to
125+
finish any in progress chunk migrations.
114126

127+
- You must not run the :dbcommand:`moveChunk` and
128+
:dbcommand:`moveRange` commands on the source cluster.
115129
- The shard key cannot be :ref:`refined <shard-key-refine>` while
116130
syncing.
117131
- The :dbcommand:`reshardCollection` operations from the source cluster

source/reference/mongosync.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -274,10 +274,8 @@ behavior, see :ref:`read-concern` and :ref:`write-concern`.
274274
Read Preference
275275
~~~~~~~~~~~~~~~
276276

277-
By default, ``mongosync`` sets the source cluster read preference to
278-
:readmode:`nearest` to distribute reads evenly across nodes. To change
279-
the read preference of the source cluster, specify the read preference
280-
mode in the URI of the connection string. For details, see
277+
``mongosync`` requires the :readmode:`primary` read preference
278+
when connecting to the source cluster. For more information, see
281279
:ref:`connections-read-preference`.
282280

283281
.. _c2c-capped-collections:

source/release-notes/1.7.txt

Lines changed: 69 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,74 @@ Release Notes for mongosync 1.7
1515
Patch Releases
1616
--------------
1717

18+
.. _1.7.2-c2c-release-notes:
19+
20+
1.7.2 Release
21+
~~~~~~~~~~~~~
22+
23+
**February 21, 2024**
24+
25+
Issues Fixed:
26+
27+
- Fixed bug introduced in v1.5.0 that could result in data
28+
inconsistencies when mongosync is killed or paused during
29+
the initial collection copy phase and then resumed.
30+
31+
This can only affect migrations if:
32+
33+
- The migration includes mixed _id types and the destination
34+
cluster runs MongoDB 4.4 or earlier.
35+
36+
- The migration includes capped collections and the
37+
destination cluster runs MongoDB 6.0 or later.
38+
39+
- Fixed bug introduced in v1.0.0 where indexes could be created
40+
on the destination cluster that were dropped on the source
41+
cluster during migration.
42+
43+
This can only affect migrations where the given index is both
44+
created and dropped while mongosync is running.
45+
46+
- Fixed bug introduced in v1.0.0 that could result in
47+
collections being created on the destination cluster with
48+
incorrect types, options, or indexes.
49+
50+
This can only affect migrations where collections are dropped
51+
or renamed while mongosync is running and the source or
52+
destintion cluster runs MongoDB 6.0.0 to 6.0.12 or MongoDB
53+
7.0.0 or 7.0.3.
54+
55+
- Fixed bug introduced in v1.1.0 that could result in a
56+
mongosync crash if shard key indexes on the source cluster
57+
have inconsistent values across shards for the "background"
58+
index build option.
59+
60+
This can only affect migrations that involve sharded
61+
collections and source clusters older than MongoDB 6.0.
62+
63+
Other Changes:
64+
65+
- Disables the Oplog Rollover Resilience mechanism.
66+
67+
- Live upgrade to mongosync 1.7.2 is not allowed.
68+
69+
- Reduces latency of the mongosync API.
70+
71+
Limitations:
72+
73+
- mongosync must read from the source cluster using the
74+
:readmode:`primary` read preference. If you try to start mongosync
75+
with a different read preference, it throws an error.
76+
77+
- You must stop the balancer on a sharded source cluster until
78+
mongosync finishes the collection copy phase. If you try to
79+
start mongosync while the balancer is still running, it throws
80+
an error.
81+
82+
- You must not run the :dbcommand:`moveChunk` or :dbcommand:`moveRange`
83+
commands on the source cluster. If these are run on the
84+
source cluster, mongosync throws an error.
85+
1886
.. _1.7.1-c2c-release-notes:
1987

2088
1.7.1 Release
@@ -64,7 +132,7 @@ Issues Fixed:
64132
capped collection during migration, before or while the Collection Copy phase
65133
is working on the same capped collection.
66134

67-
- Fixed bug introduced in 1.6 that caused ``mongosync`` to fail during
135+
- Fixed bug introduced in 1.6 that caused ``mongosync`` to fail during
68136
initialization if the user specified only an exclusion filter and there were
69137
no fully excluded databases.
70138

source/using-mongosync.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
:orphan:
2+
13
.. place holder for the using mongosync section TOC
24
.. _c2c-running-mongosync:
35
.. _c2c-using-mongosync:

0 commit comments

Comments
 (0)