bulk upsert操作日志中,频繁出现409,类似 current version[2] is different than the one provided [1]或是already exists这样, 贴两个吧,哪位老铁给个思路,感谢
```
{
"update": {
"_index": "",
"_type": "test",
"_id": "188656244",
"error": {
"reason": "[test][188656244]: version conflict, current version [3] is different than the one provided [2]",
"index_uuid": "7B0eai0wQa-xiulTFkkKRw",
"index": "",
"shard": "3",
"type": "version_conflict_engine_exception"
},
"status": 409
}
}
```
```
{
"update": {
"_index": "",
"_type": "test",
"_id": "188658596",
"error": {
"reason": "[test][188658596]: version conflict, document already exists (current version [1])",
"index_uuid": "7B0eai0wQa-xiulTFkkKRw",
"index": "",
"shard": "0",
"type": "version_conflict_engine_exception"
},
"status": 409
}
}
```
```
{
"update": {
"_index": "",
"_type": "test",
"_id": "188656244",
"error": {
"reason": "[test][188656244]: version conflict, current version [3] is different than the one provided [2]",
"index_uuid": "7B0eai0wQa-xiulTFkkKRw",
"index": "",
"shard": "3",
"type": "version_conflict_engine_exception"
},
"status": 409
}
}
```
```
{
"update": {
"_index": "",
"_type": "test",
"_id": "188658596",
"error": {
"reason": "[test][188658596]: version conflict, document already exists (current version [1])",
"index_uuid": "7B0eai0wQa-xiulTFkkKRw",
"index": "",
"shard": "0",
"type": "version_conflict_engine_exception"
},
"status": 409
}
}
```
2 个回复
rochy - rochy_he
赞同来自:
就是说你在写入之前,数据已经被别人修改过了,这样你再去覆盖写入是不合理的。
所以个人觉得你目前的 409 要从业务上来考虑当版本冲突时怎么处理
AnswerTouma
赞同来自: