Skip to content

Commit c02eb3a

Browse files
committed
DOCS-11960: 4.2 remove repairDatabase
1 parent 0eee3f6 commit c02eb3a

23 files changed

+66
-295
lines changed

config/redirects

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1413,7 +1413,9 @@ raw: /master/release-notes/3.0-general-improvements -> ${base}/release-notes/3.0
14131413
[v4.2-*]: /${version}/reference/method/db.collection.group -> ${base}/${version}/release-notes/4.2
14141414
[v4.2-*]: /${version}/reference/operator/meta/maxScan -> ${base}/${version}/release-notes/4.2-compatibility/#remove-maxscan
14151415
[v4.2-*]: /${version}/reference/method/cursor.maxScan -> ${base}/${version}/release-notes/4.2-compatibility/#remove-maxscan
1416-
[v4.2-*]: /${version}//reference/command/geoNear -> ${base}/${version}/release-notes/4.2-compatibility/#remove-support-for-the-geonear-command
1416+
[v4.2-*]: /${version}/reference/command/geoNear -> ${base}/${version}/release-notes/4.2-compatibility/#remove-support-for-the-geonear-command
1417+
[v4.2-*]: /${version}/reference/command/repairDatabase -> ${base}/${version}/release-notes/4.2
1418+
[v4.2-*]: /${version}/reference/method/db.collection.repairDatabase -> ${base}/${version}/release-notes/4.2
14171419

14181420

14191421
# Redirects for 4.0 or earlier (i.e. before 4.2)

source/core/data-model-operations.txt

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -158,12 +158,7 @@ the following behaviors:
158158
size. The namespace file defaults to 16 MB.
159159

160160
To change the size of the *new* namespace file, start the server with
161-
the option :option:`--nssize \<new size MB\> <mongod --nssize>`. For
162-
existing databases, after starting up the server with
163-
:option:`--nssize <mongod --nssize>`, run the :method:`db.repairDatabase()` command
164-
from the :binary:`~bin.mongo` shell. For impacts and considerations on
165-
running :method:`db.repairDatabase()`, see
166-
:dbcommand:`repairDatabase`.
161+
the option :option:`--nssize \<new size MB\> <mongod --nssize>`.
167162

168163
.. _faq-developers-embed-documents:
169164

source/core/index-creation.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ usable once the index build is complete.
7171

7272
If MongoDB is building an index in the background, you cannot
7373
perform other administrative operations involving that collection,
74-
including running :dbcommand:`repairDatabase`, dropping the
74+
including dropping the
7575
collection (i.e. :method:`db.collection.drop()`), and running
7676
:dbcommand:`compact`. These operations will return an error during
7777
background index builds.

source/faq/concurrency.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -276,8 +276,6 @@ lock at the database level for extended periods:
276276
:method:`db.collection.createIndexes()` issued *without*
277277
``background`` set to ``true``
278278

279-
* - :dbcommand:`repairDatabase`
280-
- :method:`db.repairDatabase()`
281279

282280

283281
The following administrative operations lock the database but only hold
@@ -329,9 +327,6 @@ The following MongoDB operations take a global exclusive lock:
329327
- :method:`db.copyDatabase()` obtains a :serverstatus:`global exclusive
330328
(W) lock <locks>` and will block other operations until it finishes.
331329

332-
- :method:`db.repairDatabase()` obtains a :serverstatus:`global
333-
exclusive (W) lock <locks>` and will block other operations until it
334-
finishes.
335330

336331
- Starting in MongoDB 4.0, :method:`db.collection.reIndex()` takes a
337332
:serverstatus:`global exclusive (W) lock <locks>` and will block

source/faq/replica-sets.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ Why use journaling if replication already provides data redundancy?
5757
-------------------------------------------------------------------
5858

5959
:term:`Journaling <journal>` facilitates faster crash recovery.
60-
Prior to journaling, crashes often required :dbcommand:`database repairs <repairDatabase>`
61-
or full data resync. Both were slow, and the first was unreliable.
6260

6361
Journaling is particularly useful for protection
6462
against power failures, especially if your replica set resides in a single data

source/includes/apiargs-dbcommand-repairDatabase-field.yaml

Lines changed: 0 additions & 36 deletions
This file was deleted.

source/includes/fact-index-key-length-operation-behaviors.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,14 @@ would create the index but not index such documents.
88
.. index-field-limit-reIndex
99
1010
Reindexing operations will error if the index entry for an indexed
11-
field exceeds the |limit|. Reindexing operations occur as part of
12-
:dbcommand:`compact` and :dbcommand:`repairDatabase` commands as well
11+
field exceeds the |limit|. Reindexing operations occur as part of the
12+
:dbcommand:`compact` command as well
1313
as the :method:`db.collection.reIndex()` method.
1414

1515
Because these operations drop *all* the indexes from a collection and
1616
then recreate them sequentially, the error from the |limit| prevents
1717
these operations from rebuilding any remaining indexes for the
18-
collection and, in the case of the :dbcommand:`repairDatabase` command,
19-
from continuing with the remainder of the process.
18+
collection.
2019

2120
.. index-field-limit-insert
2221

source/includes/note-repair.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
If you are running with :term:`journaling <journal>` enabled, there is
2-
almost never any need to run :dbcommand:`repairDatabase` unless you
2+
almost never any need to run repair unless you
33
need to recover from a disk-level data corruption. In the event of an
44
unclean shutdown, the server will be able to restore the data files to
55
a clean state automatically.

source/includes/options-mongod.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -737,9 +737,7 @@ name: repair
737737
args: null
738738
directive: option
739739
description: |
740-
Runs a repair routine on all databases. This is equivalent
741-
to shutting down and running the :dbcommand:`repairDatabase` database
742-
command on all databases.
740+
Runs a repair routine on all databases.
743741
744742
.. include:: /includes/warning-repair.rst
745743

source/includes/ref-toc-command-administration.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,6 @@ name: ":dbcommand:`repairCursor`"
102102
file: /reference/command/repairCursor
103103
description: "Returns a cursor that iterates over all valid documents in a collection."
104104
---
105-
name: ":dbcommand:`repairDatabase`"
106-
file: /reference/command/repairDatabase
107-
description: "Rebuilds the database and indexes by discarding invalid or corrupt data."
108-
---
109105
name: ":dbcommand:`setFeatureCompatibilityVersion`"
110106
file: /reference/command/setFeatureCompatibilityVersion
111107
description: "Enables or disables features that persist data that are backwards-incompatible."

source/includes/ref-toc-method-database.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,6 @@ name: ":method:`db.printSlaveReplicationInfo()`"
142142
file: /reference/method/db.printSlaveReplicationInfo
143143
description: "Prints a report of the status of the replica set from the perspective of the secondaries."
144144
---
145-
name: ":method:`db.repairDatabase()`"
146-
file: /reference/method/db.repairDatabase
147-
description: "Runs a repair routine on the current database."
148-
---
149145
name: ":method:`db.resetError()`"
150146
file: /reference/method/db.resetError
151147
description: "Resets the error message returned by :method:`db.getPrevError()` and :dbcommand:`getPrevError`."

source/includes/warning-repair.rst

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,14 @@
11
.. warning::
22

3-
- Before using :dbcommand:`repairDatabase`, make a backup copy of
4-
the dbpath directory.
5-
6-
- Avoid running :dbcommand:`repairDatabase` against a replica set.
7-
If you are trying to repair a :term:`replica set` member, and you
3+
- If you are trying to repair a :term:`replica set` member, and you
84
have access to an intact copy of your data (e.g. a recent backup
95
or an intact member of the :term:`replica set`), you should
106
restore from that intact copy (see
11-
:doc:`/tutorial/resync-replica-set-member`), and **not** use
12-
:dbcommand:`repairDatabase`.
7+
:doc:`/tutorial/resync-replica-set-member`).
8+
9+
- Only use :option:`mongod --repair` if you have no other options.
1310

14-
- Only use the :dbcommand:`repairDatabase` command and associated
15-
wrappers, including :method:`db.repairDatabase()` and
16-
:option:`mongod --repair`, if you have no other options. These
17-
operations remove and do not save any corrupt data during the
11+
- Make a backup copy of the dbpath directory before running repair.
12+
The operation removes without saving any corrupt data during the
1813
repair process.
1914

source/reference/built-in-roles.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ Every database includes the following database administration roles:
140140
- :authaction:`enableProfiler`
141141
- :authaction:`reIndex`
142142
- :authaction:`renameCollectionSameDB`
143-
- :authaction:`repairDatabase`
144143
- :authaction:`storageDetails`
145144
- :authaction:`validate`
146145

@@ -432,7 +431,6 @@ Cluster Administration Roles
432431
Provides the following actions on *all* databases in the cluster:
433432

434433
- :authaction:`killCursors`
435-
- :authaction:`repairDatabase`
436434

437435
.. _backup-and-restore-roles:
438436

source/reference/command/repairDatabase.txt

Lines changed: 0 additions & 158 deletions
This file was deleted.

source/reference/method/db.repairDatabase.txt

Lines changed: 0 additions & 31 deletions
This file was deleted.

0 commit comments

Comments
 (0)