How can I find out when MongoDB recovery is over

As in the header, I have a replicaSet with 1 primary, 1 secondary and 1 arbiter, I restored a large database in primary form, and this is a much faster instance than the secondary one. Currently, the average from time to time depends on the number of hours (hours) and the recovery status with the clock. Can I do something? Can I find out about the progress of the recovery?

+4
source share
1 answer

First, I will answer your second question. "May I inquire about the progress of the restoration?" Yes, you can connect to the primary replica set and run the rs.status command to see the status of each member in RS. Refer to the stateStr field of the output, which will indicate the friendly name of the status code. This indicates the progress of the recovery.

In your title, however, you asked if you knew when it would end. This is much more complicated. It is not possible to know “exactly” when the secondary part completes synchronization with another member.

" - ?"; , , . rs.status , , optime , , . "" , . , , , , . , .

; , . , io, , - . .

+1

Source: https://habr.com/ru/post/1584614/


All Articles