我们如何知道 SolrCloud 集群中的所有 Solr 节点是否同步?

How do we know that all the Solr nodes in a SolrCloud cluster are in sync?

我有 SolrCloud 设置 2 Solr nodes3 ZooKeeper nodes。碎片 # 1 和 replicationFactor # 2.

如何知道两个 Solr 节点 (leaders/replicas) 是否同步并且所有索引数据都已成功复制?

谢谢, 阿米特

SolrCloud API 调用是完全一致的,因为当响应返回时,它是在所有相关副本确认收到更新并将其添加到事务日志后才这样做的(否则你会得到一个错误).

The indexing flow in SolrCloud is as follows:

Incoming documents are received by a node and forwarded to the proper leader.

From the leader they’re sent to all replicas for the relevant shard.

The replicas respond to their leader.

The leader responds to the originating node.

After all the leaders have responded, the originating node replies to the client. At this point, all documents have been flushed to the tlog for all the nodes in the cluster!