Index

STARTUP2 模式 - command admin.$cmd command: isMaster { isMaster: 1 } keyUpdates:0 writeConflicts:0 numYields:0 reslen:644 …

  • August 16, 2016

MongoDB 3.2.8 目前處於 STARTUP2 模式建構索引。具有 3 個節點的副本集。

2016-08-15T08:11:19.385+0200 I -        [rsSync]   Index Build: 387200/2273552 17%
2016-08-15T08:11:19.425+0200 I COMMAND  [conn17] command admin.$cmd command: replSetHeartbeat { replSetHeartbeat: "etrer", configVersion: 8, from: "hostname", fromId: 0, term: 17 } keyUpdates:0 writeConflicts:0 numYields:0 reslen:485 locks:{} protocol:op_command 1ms
2016-08-15T08:11:19.492+0200 I COMMAND  [conn146] command admin.$cmd command: isMaster { isMaster: 1 } keyUpdates:0 writeConflicts:0 numYields:0 reslen:644 locks:{} protocol:op_query 1ms
2016-08-15T08:11:19.504+0200 I COMMAND  [conn145] command admin.$cmd command: isMaster { isMaster: 1 } keyUpdates:0 writeConflicts:0 numYields:0 reslen:644 locks:{} protocol:op_query 8ms
2016-08-15T08:11:20.395+0200 I COMMAND  [conn158] command admin.$cmd command: isMaster { isMaster: 1 } keyUpdates:0 writeConflicts:0 numYields:0 reslen:644 locks:{} protocol:op_query 3ms
2016-08-15T08:11:21.428+0200 I COMMAND  [conn17] command admin.$cmd command: replSetHeartbeat { replSetHeartbeat: "sfsfsf", configVersion: 8, from: "hostname", fromId: 0, term: 17 } keyUpdates:0 writeConflicts:0 numYields:0 reslen:485 locks:{} protocol:op_command 2ms
2016-08-15T08:11:22.242+0200 I -        [rsSync]   Index Build: 387700/2273552 17%
2016-08-15T08:11:22.460+0200 I COMMAND  [conn1670] command admin.$cmd command: replSetHeartbeat { replSetHeartbeat: "srgewfef", configVersion: 8, from: "hostname", fromId: 2, term: 17 } keyUpdates:0 writeConflicts:0 numYields:0 reslen:485 locks:{} protocol:op_command 1ms
2016-08-15T08:11:22.738+0200 I COMMAND  [conn1205] command admin.$cmd command: isMaster { isMaster: 1 } keyUpdates:0 writeConflicts:0 numYields:0 reslen:644 locks:{} protocol:op_query 4ms
2016-08-15T08:11:23.053+0200 I COMMAND  [conn2969] command admin.$cmd command: serverStatus { serverStatus: 1, locks: false, recordStats: false } keyUpdates:0 writeConflicts:0 numYields:0 reslen:18641 locks:{} protocol:op_query 5ms
2016-08-15T08:11:23.750+0200 I COMMAND  [conn1098] command admin.$cmd command: isMaster { isMaster: 1 } keyUpdates:0 writeConflicts:0 numYields:0 reslen:644 locks:{} protocol:op_query 2ms
2016-08-15T08:11:23.814+0200 I COMMAND  [conn1113] command admin.$cmd command: isMaster { isMaster: 1 } keyUpdates:0 writeConflicts:0 numYields:0 reslen:644 locks:{} protocol:op_query 1ms
2016-08-15T08:11:23.836+0200 I COMMAND  [conn747] command admin.$cmd command: isMaster { isMaster: 1 } keyUpdates:0 writeConflicts:0 numYields:0 reslen:644 locks:{} protocol:op_query 3ms
2016-08-15T08:11:23.940+0200 I COMMAND  [conn2197] command admin.$cmd command: isMaster { isMaster: 1 } keyUpdates:0 writeConflicts:0 numYields:0 reslen:644 locks:{} protocol:op_query 1ms
2016-08-15T08:11:24.376+0200 I COMMAND  [conn2784] command admin.$cmd command: isMaster { isMaster: 1 } keyUpdates:0 writeConflicts:0 numYields:0 reslen:644 locks:{} protocol:op_query 1ms
2016-08-15T08:11:24.518+0200 I COMMAND  [conn2648] command admin.$cmd command: isMaster { isMaster: 1 } keyUpdates:0 writeConflicts:0 numYields:0 reslen:644 locks:{} protocol:op_query 5ms
2016-08-15T08:11:25.067+0200 I COMMAND  [conn1425] command admin.$cmd command: isMaster { isMaster: 1 } keyUpdates:0 writeConflicts:0 numYields:0 reslen:644 locks:{} protocol:op_query 1ms
2016-08-15T08:11:25.316+0200 I COMMAND  [conn2848] command admin.$cmd command: isMaster { isMaster: 1 } keyUpdates:0 writeConflicts:0 numYields:0 reslen:644 locks:{} protocol:op_query 2ms
2016-08-15T08:11:25.403+0200 I COMMAND  [conn2693] command admin.$cmd command: isMaster { isMaster: 1 } keyUpdates:0 writeConflicts:0 numYields:0 reslen:644 locks:{} protocol:op_query 2ms
2016-08-15T08:11:25.472+0200 I COMMAND  [conn2908] command admin.$cmd command: isMaster { isMaster: 1 } keyUpdates:0 writeConflicts:0 numYields:0 reslen:644 locks:{} protocol:op_query 1ms
2016-08-15T08:11:25.501+0200 I -        [rsSync]   Index Build: 388400/2273552 17%
2016-08-15T08:11:25.631+0200 I COMMAND  [conn2896] command admin.$cmd command: isMaster { isMaster: 1 } keyUpdates:0 writeConflicts:0 numYields:0 reslen:644 locks:{} protocol:op_query 5ms

此消息(每秒,不到一天 64680 次)是什麼意思?

COMMAND  [conn747] command admin.$cmd command: isMaster { isMaster: 1 } keyUpdates:0 writeConflicts:0 numYields:0 reslen:644 locks:{} protocol:op_query 2ms

MongoDB 驅動程序和客戶端使用該isMaster命令來描述mongod實例的目前角色、監控往返時間並驗證副本集配置/狀態(如果適用)。

頻繁isMaster的命令是預期的行為,儘管發生率會根據您連接的客戶端/驅動程序的數量以及驅動程序版本而有所不同。

有關詳細資訊,您可能對伺服器發現和監控 (SDAM) 規範感興趣,該規範詳細說明了官方支持的 MongoDB 驅動程序的行為。

引用自:https://dba.stackexchange.com/questions/146792