弹性搜索集群同步问题 - 每个节点具有不同的索引值 [英] Elastic search cluster sync issue- each node is having different values for an index

查看:109
本文介绍了弹性搜索集群同步问题 - 每个节点具有不同的索引值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在使用具有2个节点的弹性搜索集群。该索引似乎不同步。
对于索引,每个节点具有不同的文档计数。目标是始终使群集保持同步。
第一个节点可以看到第二个节点,但是第二个节点看不到集群中的第一个节点。



有没有办法强制同步群集,每个节点中的数据是相同的?

解决方案

如果您需要两个节点中的数据,请使用复制。这样就可以在另一个节点上复制每个分片的数据。当然,这不是主从。如果您的索引具有多个分片,则一个节点可以具有一个分片的主分片和另一个分片的副本。最接近的是使用一个碎片和一个副本的索引。比两个节点都有数据。



另一个选项可能是在一个集群(一个节点)中创建快照,并将其恢复到另一个集群(一个节点)中。当然这种方式在同步上有一个滞后。只有两个节点,这不是首选解决方案。


We are using elastic search cluster with 2 nodes. The index seems to be out of sync. For an index, each node has different count of documents. The objective is to always keep the cluster in sync. First node can see the second node but second node cannot see the first node in the cluster.

Is there any way to force sync the cluster so that the data in each node is same?

解决方案

If you need the data in two nodes, use replication. That way a copy of the data of each shard is made on the other node. Beware though, this is not master-slave. If your index has multiple shards, one node can have the primary of one shard and the replica of another. The closest you can get is to have an index with one shard and one replica. Than both nodes would have the data.

Another option could be to create snapshots in one cluster (of one node) and restore them in the other cluster (of one node). Of course there is a lag in the synchronisation this way. With just two nodes this would not be the preferred solution.

这篇关于弹性搜索集群同步问题 - 每个节点具有不同的索引值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆