ES数据写入一致性
来源:2-2 -Document介绍

慕妹2362023
2020-01-11
ES官方写一致性原理
one:要求我们这个写操作,只要有一个primary shard是active活跃可用的,就可以执行
all:要求我们这个写操作,必须所有的primary shard和replica shard都是活跃的,才可以执行这个写操作
quorum(默认):默认的值,要求所有的shard中,必须是大部分的shard都是活跃的,可用的,才可以执行这个写操作(1个节点例外)
算法:number_of_replicas = int((primary + number_of_replicas) / 2 ) + 1,当number_of_replicas>1时才生效
quorum不齐全时,默认等待1分钟,可设置timeout=100ms,timeout=30s,timeout=1m
配置方法:
put /index/type/id?consistency=quorum
请问老师 这个在ES7中是否是一致的呢
写回答
1回答
-
rockybean
2020-01-12
这个从 5 就开始变了,现在使用 wait_for_active_shards 参数
https://www.elastic.co/guide/en/elasticsearch/reference/7.5/docs-index_.html#index-wait-for-active-shards
00
相似问题