@@ -34,29 +34,84 @@ Prerequisites
34
34
35
35
To downgrade from |newversion| to |oldversion|, you must remove
36
36
incompatible features that are persisted and/or update incompatible
37
- configuration settings.
37
+ configuration settings. These include:
38
+
39
+ 1. Cluster Default Read and Write Concerns
40
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
41
+
42
+ MongoDB 5.0 changed the default value for cluster-wide read and write
43
+ concerns, and downgrading to MongoDB 4.4 might change those defaults
44
+ back. Consider manually configuring your cluster's default read and
45
+ write concern before downgrading:
46
+
47
+ - To manually configure a default value for a cluster's read or write
48
+ concern, use the :dbcommand:`setDefaultRWConcern` command.
49
+
50
+ - If your cluster includes an :doc:`arbiter
51
+ </core/replica-set-arbiter>`, and you had previously disabled
52
+ ``"Majority"`` read concern to prevent cache pressure in certain
53
+ situations, you may want to configure
54
+ :option:`--enableMajorityReadConcern false
55
+ <mongod --enableMajorityReadConcern>` or
56
+ :setting:`replication.enableMajorityReadConcern: false
57
+ <replication.enableMajorityReadConcern>` once you downgrade.
58
+
59
+ 2. Document Fields with ``.`` or ``$`` Characters
60
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
61
+
62
+ MongoDB 5.0 adds support for including the ``.`` or ``$`` characters in
63
+ document field names. You must delete any documents containing field
64
+ names that include the ``.`` or ``$`` characters before downgrading
65
+ to MongoDB 4.4.
66
+
67
+ 3. Slim-format Timezone Data Files
68
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
69
+
70
+ MongoDB 5.0 enables support for slim-format timezone data files. If
71
+ using slim-format timezone data files in your deployment, as provided
72
+ to MongoDB with the :option:`--timeZoneInfo <mongod --timeZoneInfo>`
73
+ command line option or :setting:`processManagement.timeZoneInfo`
74
+ configuration file setting, you must downgrade to MongoDB 4.4.7 or
75
+ later, or else revert your timezone data files to use the previous
76
+ non-slim-format data files.
77
+
78
+ 4. Resharding
79
+ ~~~~~~~~~~~~~
80
+
81
+ Ensure that any :ref:`resharding operations <sharding-resharding>` have
82
+ successfully completed before attempting any downgrade procedure. If a
83
+ recent resharding operation has failed due to a primary failover, you
84
+ must first run the :dbcommand:`cleanupReshardCollection` command before
85
+ downgrading the ``featureCompatibilityVersion`` of your sharded cluster.
86
+
87
+ If a resharding operation is still running while you downgrade the
88
+ ``featureCompatibilityVersion`` of your sharded cluster, the resharding
89
+ operation will abort.
38
90
39
- .. note::
91
+ .. |target| replace:: :binary:`~bin.mongos` instance
40
92
41
- If you ran a :ref:`resharding operation <sharding-resharding>` and a
42
- primary failover occurred during the resharding operation, you must
43
- run :dbcommand:`cleanupReshardCollection` before downgrading the
44
- ``featureCompatibilityVersion`` of your sharded cluster.
93
+ .. _5.0-downgrade-feature-compatibility-sharded-cluster:
45
94
46
- If you started a :ref:`resharding operation <sharding-resharding>`,
47
- and it is still running while you downgrade the
48
- ``featureCompatibilityVersion`` of your sharded cluster, the
49
- resharding operation will abort.
95
+ 5. Downgrade Feature Compatibility Version (fCV)
96
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
50
97
98
+ First, verify the following:
51
99
52
- .. |target| replace:: :binary:`~bin.mongos` instance
100
+ - Ensure that no initial sync is in progress. Running
101
+ :dbcommand:`setFeatureCompatibilityVersion` command while an
102
+ initial sync is in progress will cause the initial sync to restart.
53
103
54
- .. _5.0-downgrade-feature-compatibility-sharded-cluster:
104
+ - Ensure that no nodes have a ``newlyAdded`` field in their
105
+ :doc:`replica set configuration </reference/replica-configuration>`.
106
+ Use the :method:`rs.conf()` method on each node in your sharded
107
+ cluster to verify this. The ``newlyAdded`` only appears in a node's
108
+ replica set configuration document during and shortly after an initial
109
+ sync.
55
110
56
- 1. Downgrade Feature Compatibility Version (fCV)
57
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
111
+ - Ensure that no replica set member is in :replstate:`ROLLBACK` or
112
+ :replstate:`RECOVERING` state.
58
113
59
- To downgrade the ``featureCompatibilityVersion`` of your sharded
114
+ Next, to downgrade the ``featureCompatibilityVersion`` of your sharded
60
115
cluster:
61
116
62
117
#. Connect a :binary:`~bin.mongo` shell to the |target|.
@@ -65,9 +120,16 @@ cluster:
65
120
66
121
.. note::
67
122
68
- While :dbcommand:`setFeatureCompatibilityVersion` is running on
69
- the sharded cluster, chunk migrations, splits, and merges
70
- can fail with ``ConflictingOperationInProgress``.
123
+ - While :dbcommand:`setFeatureCompatibilityVersion` is running on
124
+ the sharded cluster, chunk migrations, splits, and merges can
125
+ fail with ``ConflictingOperationInProgress``.
126
+
127
+ - If :dbcommand:`setFeatureCompatibilityVersion` fails with a
128
+ ``ManualInterventionRequired`` error, and the cluster has
129
+ recently undergone a resharding operation that had failed due to
130
+ an election, you must run the ``cleanupReshardCollection``
131
+ command before attempting
132
+ :dbcommand:`setFeatureCompatibilityVersion` again.
71
133
72
134
#. To ensure that all members of the sharded cluster reflect the
73
135
updated ``featureCompatibilityVersion``, connect to each shard replica
@@ -97,7 +159,7 @@ cluster:
97
159
For more information on the returned ``featureCompatibilityVersion``
98
160
value, see :ref:`view-fcv`.
99
161
100
- 2 . Remove fCV |newversion| Persisted Features
162
+ 6 . Remove fCV |newversion| Persisted Features
101
163
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
102
164
103
165
The following steps are necessary only if fCV has ever been set to
@@ -106,15 +168,24 @@ The following steps are necessary only if fCV has ever been set to
106
168
Remove all persisted |newversion| |features| that are incompatible with
107
169
|oldversion|. These include:
108
170
109
- - This list is forthcoming.
171
+ Time-series Collections
172
+ Remove all :ref:`time series collections
173
+ <manual-timeseries-collection>`.
174
+
175
+ Runtime Audit Filter Management
176
+ Disable runtime audit filter management by setting the
177
+ ``auditLog.runtimeConfiguration`` configuration file setting to
178
+ ``false``.
110
179
111
- 3 . Remove |newversion| Features
180
+ 7 . Remove |newversion| Features
112
181
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
113
182
114
183
Remove all persisted features that use |newversion| features. These
115
184
include but are not limited to:
116
185
117
- - This list is forthcoming.
186
+ - If any view definitions include 5.0 operators, such as
187
+ :expression:`$dateAdd` or :expression:`$sampleRate`, they must be
188
+ removed. See :ref:`5.0-rel-notes-new-agg-operators` for the full list.
118
189
119
190
.. |binary| replace:: any :binary:`~bin.mongod`/:binary:`~bin.mongos` instance
120
191
0 commit comments