博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Replica Set Member States
阅读量:5864 次
发布时间:2019-06-19

本文共 1040 字,大约阅读时间需要 3 分钟。

hot3.png

最近写MongoDB监控脚本,要判断节点状态,这里整理了所有的节点状态值,对应  命令 rs.status().members 中的 state 和 stateStr 字段,如:

"state" : 3,

"stateStr" : "RECOVERING"

 

0 Not yet an active member of any set. All members start up in this state. The  parses the  while in .
1 The member in state  is the only member that can accept write operations. Eligible to vote.
2 A member in state  is replicating the data store. Eligible to vote.
3 Members either perform startup self-checks, or transition from completing a  or . Eligible to vote.
5 The member has joined the set and is running an initial sync. Eligible to vote.
6 The member’s state, as seen from another member of the set, is not yet known.
7  do not replicate data and exist solely to participate in elections. Eligible to vote.
8 The member, as seen from another member of the set, is unreachable.
9 This member is actively performing a . Eligible to vote. Data is not available for reads from this member.
10 This member was once in a replica set but was subsequently removed.

转载于:https://my.oschina.net/xxj123go/blog/2248915

你可能感兴趣的文章
递归,冒泡,阶乘的介绍
查看>>
Maven学习总结(4)——Maven核心概念
查看>>
Maven学习总结(十)——使用Maven编译项目gbk的不可映射问题
查看>>
Mongodb的开启和关闭
查看>>
MyBatis学习总结(10)——批量操作
查看>>
Java基础学习总结(11)——重载与重写
查看>>
开源史上最成功的8个开源产品
查看>>
[TJOI2019]大中锋的游乐场——最短路+DP
查看>>
Maven学习总结(六)——Maven与Eclipse整合
查看>>
值传递与地址传递
查看>>
java图片裁剪原理
查看>>
java 进行ping和telnet命令
查看>>
QQ空间技术架构之深刻揭密
查看>>
大型网站技术架构(六)网站的伸缩性架构
查看>>
禅道二次开发发送邮件功能
查看>>
《少有人走过的路–心智成熟的旅程》读书笔记
查看>>
密码找回漏洞总结
查看>>
深入Java多线程——Java内存模型深入(1)
查看>>
SpringMVC+Spring+Mybatis整合应用(3)
查看>>
关于 > /dev/null 2>&1
查看>>