@@ -47,7 +47,7 @@ The command has the following syntax:
47
47
another state, the :data:`replSetGetStatus.initialSyncStatus`
48
48
metrics are no longer available.
49
49
50
- - In earlier versions (3.4 .x-4.2.0)
50
+ - In earlier versions (3.6 .x-4.2.0)
51
51
To return :ref:`initial sync <replica-set-initial-sync>` status
52
52
information, include ``initialSync: 1`` in the command on a
53
53
secondary member or a member in :replstate:`STARTUP2` state:
@@ -84,7 +84,7 @@ Example
84
84
85
85
.. code-block:: javascript
86
86
87
- db.adminCommand( { replSetGetStatus : 1 } )
87
+ db.adminCommand( { replSetGetStatus: 1 } )
88
88
89
89
The command returns the following output for an example
90
90
replica set primary:
@@ -265,7 +265,7 @@ Example
265
265
266
266
.. code-block:: javascript
267
267
268
- db.adminCommand( { replSetGetStatus : 1 } )
268
+ db.adminCommand( { replSetGetStatus: 1 } )
269
269
270
270
The command returns the following output for an example replica set secondary:
271
271
@@ -417,44 +417,53 @@ Example
417
417
"operationTime" : Timestamp(1583386018, 1)
418
418
}
419
419
420
- In earlier versions (3.4 .x-4.2.0)
420
+ In earlier versions (3.6 .x-4.2.0)
421
421
You can include the optional ``initialSync: 1`` to include
422
422
the :data:`replSetGetStatus.initialSyncStatus` in the
423
423
output (you can omit if you do not want to return the
424
424
initial sync status):
425
425
426
426
.. code-block:: javascript
427
427
428
- db.adminCommand( { replSetGetStatus : 1, initialSync: 1} )
428
+ db.adminCommand( { replSetGetStatus: 1, initialSync: 1 } )
429
429
430
430
- id: startup2
431
431
name: Include Initial Sync Metrics
432
432
content: |
433
433
434
+ Starting in MongoDB 5.2,
435
+ the :data:`replSetGetStatus.initialSyncStatus` document
436
+ contains :ref:`additional fields
437
+ <fcbis-initial-sync-fields>` when using a
438
+ :ref:`file copy based initial sync
439
+ <replica-set-initial-sync-file-copy-based>`.
440
+
441
+
434
442
Starting in MongoDB 4.2.1,
435
443
If you run :dbcommand:`replSetGetStatus` on a member
436
444
during its initial sync, the command returns
437
445
:data:`replSetGetStatus.initialSyncStatus` metrics.
438
446
439
447
.. code-block:: javascript
440
448
441
- db.adminCommand( { replSetGetStatus : 1} )
449
+ db.adminCommand( { replSetGetStatus: 1 } )
442
450
443
- Once the member finishes its initial sync and transitions to
444
- another state,the :data:`replSetGetStatus.initialSyncStatus`
445
- metrics is no longer available.
451
+ Once the member finishes its initial sync and transitions
452
+ to another state, the
453
+ :data:`replSetGetStatus.initialSyncStatus` document is no
454
+ longer available.
446
455
447
- In earlier versions (3.4 .x-4.2.0)
456
+ In earlier versions (3.6 .x-4.2.0)
448
457
You can include the optional ``initialSync: 1`` to include
449
458
the :data:`replSetGetStatus.initialSyncStatus` in the
450
459
output (you can omit if you do not want to return the
451
460
initial sync status):
452
461
453
462
.. code-block:: javascript
454
463
455
- db.adminCommand( { replSetGetStatus : 1, initialSync: 1} )
464
+ db.adminCommand( { replSetGetStatus: 1, initialSync: 1 } )
456
465
457
- For 3.4 .x-4.2.0 replica sets,
466
+ For 3.6 .x-4.2.0 replica sets,
458
467
:data:`replSetGetStatus.initialSyncStatus` metrics remains
459
468
available after the member completes its initial sync.
460
469
That is, you can run the :dbcommand:`replSetGetStatus`
@@ -1050,7 +1059,7 @@ following fields:
1050
1059
.. data:: replSetGetStatus.initialSyncStatus
1051
1060
1052
1061
1053
- A document provides information on the progress and status of
1062
+ A document that provides information on the progress and status of
1054
1063
:ref:`initial sync <replica-set-initial-sync>` on this member.
1055
1064
1056
1065
.. include:: /includes/fact-rs-status-init-sync-availability.rst
@@ -1132,7 +1141,11 @@ following fields:
1132
1141
* - rollBackId
1133
1142
1134
1143
- The sync source's rollback identifier at the start of the
1135
- initial sync attempt.
1144
+ initial sync attempt.
1145
+
1146
+ ``rollBackId`` does not appear when using
1147
+ :ref:`file copy based initial sync
1148
+ <replica-set-initial-sync-file-copy-based>`.
1136
1149
1137
1150
.. versionadded:: 4.4
1138
1151
@@ -1251,6 +1264,137 @@ following fields:
1251
1264
}
1252
1265
}
1253
1266
1267
+ .. _fcbis-initial-sync-fields:
1268
+
1269
+ .. data:: replSetGetStatus.initialSyncStatus.method
1270
+
1271
+ .. versionadded:: 5.2
1272
+
1273
+ The method used for the :ref:`initial sync
1274
+ <replica-set-initial-sync>`.
1275
+
1276
+ If set to ``logical``, the sync is a :ref:`logical initial sync
1277
+ <replica-set-initial-sync-logical>`. If set to ``fileCopyBased``, the
1278
+ sync is a :ref:`file copy based initial sync
1279
+ <replica-set-initial-sync-file-copy-based>`.
1280
+
1281
+ .. data:: replSetGetStatus.initialSyncStatus.approxTotalDataSize
1282
+
1283
+ The approximate size (in bytes) of all files to be synced during
1284
+ :ref:`file copy based initial sync
1285
+ <replica-set-initial-sync-file-copy-based>`.
1286
+
1287
+ This field only appears when using :ref:`file copy based initial
1288
+ sync <replica-set-initial-sync-file-copy-based>`.
1289
+
1290
+ .. data:: replSetGetStatus.initialSyncStatus.approxTotalBytesCopied
1291
+
1292
+ The total bytes already copied.
1293
+
1294
+ This field only appears when using :ref:`file copy based initial
1295
+ sync <replica-set-initial-sync-file-copy-based>`.
1296
+
1297
+ .. data:: replSetGetStatus.initialSyncStatus.totalInitialSyncElapsedMillis
1298
+
1299
+ The total time elapsed for the sync attempt in progress.
1300
+
1301
+ This field only appears when using :ref:`file copy based initial
1302
+ sync <replica-set-initial-sync-file-copy-based>`.
1303
+
1304
+ .. data:: replSetGetStatus.initialSyncStatus.remainingInitialSyncEstimatedMillis
1305
+
1306
+ The expected time remaining for the sync attempt in progress.
1307
+
1308
+ This field only appears when using :ref:`file copy based initial
1309
+ sync <replica-set-initial-sync-file-copy-based>`.
1310
+
1311
+ .. data:: replSetGetStatus.initialSyncStatus.initialBackupDataSize
1312
+
1313
+ The total size (in bytes) of the initial set of files to be synced.
1314
+
1315
+ This field only appears when using :ref:`file copy based initial
1316
+ sync <replica-set-initial-sync-file-copy-based>`.
1317
+
1318
+ .. data:: replSetGetStatus.initialSyncStatus.previousOplogEnd
1319
+
1320
+ The :term:`optime` available in the previous :term:`backup cursor`.
1321
+
1322
+ This field only appears when using :ref:`file copy based initial
1323
+ sync <replica-set-initial-sync-file-copy-based>`.
1324
+
1325
+ .. data:: replSetGetStatus.initialSyncStatus.currentOplogEnd
1326
+
1327
+ The last :term:`optime` guaranteed to be available in the current
1328
+ :term:`backup cursor`.
1329
+
1330
+ This field only appears when using :ref:`file copy based initial
1331
+ sync <replica-set-initial-sync-file-copy-based>`.
1332
+
1333
+ .. data:: replSetGetStatus.initialSyncStatus.syncSourceLastApplied
1334
+
1335
+ The :term:`optime` of the last update applied at the sync source
1336
+ prior to the start of this :term:`backup cursor`.
1337
+
1338
+ This field only appears when using :ref:`file copy based initial
1339
+ sync <replica-set-initial-sync-file-copy-based>`.
1340
+
1341
+ .. _fcbis-extension:
1342
+
1343
+ .. data:: replSetGetStatus.initialSyncStatus.numExtensions
1344
+
1345
+ The number of times the sync has started a new :term:`backup cursor`.
1346
+
1347
+ This field does not appear if a backup cursor has not started.
1348
+
1349
+ This field only appears when using :ref:`file copy based initial
1350
+ sync <replica-set-initial-sync-file-copy-based>`.
1351
+
1352
+ .. data:: replSetGetStatus.initialSyncStatus.extensionDataSize
1353
+
1354
+ The total bytes in the current :ref:`extension <fcbis-extension>`.
1355
+
1356
+ This field does not appear if there is no extension in progress.
1357
+
1358
+ This field only appears when using :ref:`file copy based initial
1359
+ sync <replica-set-initial-sync-file-copy-based>`.
1360
+
1361
+ .. data:: replSetGetStatus.initialSyncStatus.files
1362
+
1363
+ An array of files to be synced during :ref:`file copy based initial
1364
+ sync <replica-set-initial-sync-file-copy-based>`.
1365
+
1366
+ This field only appears when using :ref:`file copy based initial
1367
+ sync <replica-set-initial-sync-file-copy-based>`.
1368
+
1369
+ .. data:: replSetGetStatus.initialSyncStatus.files[n].filePath
1370
+
1371
+ The path of the file relative to the root of the
1372
+ :term:`backup cursor`.
1373
+
1374
+ This field only appears when using :ref:`file copy based initial
1375
+ sync <replica-set-initial-sync-file-copy-based>`.
1376
+
1377
+ .. data:: replSetGetStatus.initialSyncStatus.files[n].fileSize
1378
+
1379
+ The size of the file as reported by the :term:`backup cursor`.
1380
+
1381
+ This field only appears when using :ref:`file copy based initial
1382
+ sync <replica-set-initial-sync-file-copy-based>`.
1383
+
1384
+ .. data:: replSetGetStatus.initialSyncStatus.files[n].bytesCopied
1385
+
1386
+ The number of bytes copied so far.
1387
+
1388
+ This field only appears when using :ref:`file copy based initial
1389
+ sync <replica-set-initial-sync-file-copy-based>`.
1390
+
1391
+ .. data:: replSetGetStatus.initialSyncStatus.files[n].extensionNumber
1392
+
1393
+ The number of the :ref:`extension <fcbis-extension>` the file belongs
1394
+ to if this file is part of an extension.
1395
+
1396
+ This field only appears when using :ref:`file copy based initial
1397
+ sync <replica-set-initial-sync-file-copy-based>`.
1254
1398
1255
1399
.. data:: replSetGetStatus.members
1256
1400
0 commit comments