gpt4 book ai didi

elasticsearch - Elasticsearch快照的内容

转载 作者:行者123 更新时间:2023-12-02 22:36:43 26 4
gpt4 key购买 nike

我们将使用快照API进行集群的蓝绿色部署。我们要对现有群集进行快照,启动一个新群集,然后从快照中还原数据。我们还需要将对现有集群数据的任何更改应用于新集群(在切换并启用新集群之前)。

我们的想法是,我们可以索引数据库中的数据,这些数据在创建快照的时间戳之后经过更改,以确保对运行中的 Activity 集群进行的任何写操作都将应用于新集群(新集群仅包含数据)从快照还原)。我的问题是要使用哪个时间戳记日期? Snapshot API具有给定快照的start_time和end_time值-但我不确定end_time在此上下文中的含义是“到目前为止所有数据都已修改”。我觉得这只是一个标记,可以告诉您手术花费了多长时间。我可能是错的。

有谁知道如何查找快照包含的内容?我们可以使用end_time作为标记来了解快照包含该日期之前的所有数据修改吗?

谢谢!

最佳答案

根据documentation

Snapshotting process is executed in non-blocking fashion. All indexing and searching operation can continue to be executed against the index that is being snapshotted. However, a snapshot represents the point-in-time view of the index at the moment when snapshot was created, so no records that were added to the index after the snapshot process was started will be present in the snapshot.



您将需要使用start_time或start_time_in_millis。

由于快照是增量快照,因此您可以创建第一个完整快照,并且在创建第一个完整快照后立即可以创建一个以上快照。

还有一个问题:为什么要创建已经在Elasticsearch中实现的功能?如果可以同时运行两个集群,则可以合并两个集群,让它们同步,将写查询切换到新集群,并逐渐将旧服务器与合并集群断开连接,仅留下新集群。

关于elasticsearch - Elasticsearch快照的内容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49517215/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com