运行rs.status() 输出:{
set: 'rs0',
date: 2025-09-17T03:47:39.680Z,
myState: 1,
term: Long('5'),
syncSourceHost: '',
syncSourceId: -1,
heartbeatIntervalMillis: Long('2000'),
majorityVoteCount: 1,
writeMajorityCount: 1,
votingMembersCount: 1,
writableVotingMembersCount: 1,
optimes: {
lastCommittedOpTime: { ts: Timestamp({ t: 1758080854, i: 1 }), t: Long('5') },
lastCommittedWallTime: 2025-09-17T03:47:34.569Z,
readConcernMajorityOpTime: { ts: Timestamp({ t: 1758080854, i: 1 }), t: Long('5') },
readConcernMajorityWallTime: 2025-09-17T03:47:34.569Z,
appliedOpTime: { ts: Timestamp({ t: 1758080854, i: 1 }), t: Long('5') },
durableOpTime: { ts: Timestamp({ t: 1758080854, i: 1 }), t: Long('5') },
lastAppliedWallTime: 2025-09-17T03:47:34.569Z,
lastDurableWallTime: 2025-09-17T03:47:34.569Z
},
lastStableRecoveryTimestamp: Timestamp({ t: 1758080794, i: 1 }),
electionCandidateMetrics: {
lastElectionReason: 'electionTimeout',
lastElectionDate: 2025-09-16T10:15:49.919Z,
electionTerm: Long('5'),
lastCommittedOpTimeAtElection: { ts: Timestamp({ t: 0, i: 0 }), t: Long('-1') },
lastSeenOpTimeAtElection: { ts: Timestamp({ t: 1758017622, i: 1 }), t: Long('4') },
numVotesNeeded: 1,
priorityAtElection: 1,
electionTimeoutMillis: Long('10000'),
newTermStartDate: 2025-09-16T10:15:49.938Z,
wMajorityWriteAvailabilityDate: 2025-09-16T10:15:50.039Z
},
members: [
{
_id: 0,
name: 'localhost:27111',
health: 1,
state: 1,
stateStr: 'PRIMARY',
uptime: 63111,
optime: [Object],
optimeDate: 2025-09-17T03:47:34.000Z,
lastAppliedWallTime: 2025-09-17T03:47:34.569Z,
lastDurableWallTime: 2025-09-17T03:47:34.569Z,
syncSourceHost: '',
syncSourceId: -1,
infoMessage: '',
electionTime: Timestamp({ t: 1758017749, i: 1 }),
electionDate: 2025-09-16T10:15:49.000Z,
configVersion: 1,
configTerm: 5,
self: true,
lastHeartbeatMessage: ''
}
],
ok: 1,
'$clusterTime': {
clusterTime: Timestamp({ t: 1758080854, i: 1 }),
signature: {
hash: Binary.createFromBase64('AAAAAAAAAAAAAAAAAAAAAAAAAAA=', 0),
keyId: Long('0')
}
},
operationTime: Timestamp({ t: 1758080854, i: 1 })
}
最新发布