- Y( p# y* L1 P/ b& r ofor each member that is healthy: % T: F7 N8 P8 h3 c, ` if member[state] == PRIMARY( ~/ O- [# L# @8 `4 U
add to set of possible sync targets* ?2 e! R; K7 D9 A) p
! r J1 V2 b) y5 \6 A if member[lastOpTimeWritten] > our[lastOpTimeWritten]6 u% }1 b3 Y A! b5 u# t
add to set of possible sync targets$ Q9 {) ^7 [( p2 Y
+ m( `: q5 A2 v
sync target = member with the min ping time from the possible sync targets, I6 u5 s$ v, o) b1 p0 y% \2 A
) L& v# d' n3 k" j7 l
对于节点是否健康,MongoDB各个版本的判断依据有所不同,但都是为了找到能够正常运行的节点。; B: Q- j5 O/ z