我们正在尝试将ES索引与大约200万个文档一起使用。我们有1个碎片(我知道,我错了),刷新速度为10秒。
在大型重新索引(耗时数小时)的中间,我一直在日志中看到诸如此类的错误:
2019-08-13|11:25:32.6516|1|Warn|Conflict[0]:Doc cv.-.4439064; cause: [_doc][cv.-.4439064]: version conflict, current version [3] is different than the one provided [2]
Conflict[1]:Doc cv.-.4439862; cause: [_doc][cv.-.4439862]: version conflict, current version [3] is different than the one provided [2]
Conflict[2]:Doc cv.-.4440790; cause: [_doc][cv.-.4440790]: version conflict, current version [3] is different than the one provided [2]
Conflict[3]:Doc cv.-.4441758; cause: [_doc][cv.-.4441758]: version conflict, current version [3] is different than the one provided [2]
我编码为睡眠10秒钟,然后最多重试3次,因此操作最终得以完成。但是,即使经过了刷新率的测试,它仍然无法通过 second 时间。
上面的错误几乎总是伴随着涉及相同文档的重复:
2019-08-13|11:25:44.1724|1|Warn|Conflict[0]:Doc cv.-.4439064; cause: [_doc][cv.-.4439064]: version conflict, current version [4] is different than the one provided [3]
Conflict[1]:Doc cv.-.4439862; cause: [_doc][cv.-.4439862]: version conflict, current version [4] is different than the one provided [3]
Conflict[2]:Doc cv.-.4440790; cause: [_doc][cv.-.4440790]: version conflict, current version [4] is different than the one provided [3]
Conflict[3]:Doc cv.-.4441758; cause: [_doc][cv.-.4441758]: version conflict, current version [4] is different than the one provided [3]
鉴于:
为什么这会发生?
为什么更新成功前需要刷新两次 ?
我非常确定,此操作如此缓慢(大约48小时)的原因之一就是因为这个原因。