version_conflict_engine_exception: version_conflict_engine_exception: [_doc][id]: version conflict, current version [x] is different than the one provided [y] (HTTP 409)(版本冲突,当前版本与提供的版本不同)
Elasticsearch含义
文档更新/删除请求被乐观并发控制拒绝。文档版本(或 _seq_no/_primary_term)与请求中的不匹配;也就是说,在你读取之后有人修改了该文档。返回 HTTP 409。
原因
对同一文档的并发更新、使用过时的 version/seq_no 尝试写入、尝试创建(op_type=create)已存在的文档,或 _bulk 期间的竞态条件。
解决方法
重新读取文档,并用当前的 _seq_no 和 _primary_term(或 version)重试请求(读-改-写循环)。如需自动重试,在 _update 请求中使用 retry_on_conflict 参数;在 _update_by_query/_delete_by_query 中传入 conflicts=proceed 以跳过冲突文档并继续。如果意图是仅创建,冲突属于正常情况;在应用中捕获 409 并做相应处理(重试或跳过)。
同一数据库的其他条目
- illegal_argument_exception_fielddataillegal_argument_exception: Fielddata is disabled on text fields by default. Set fielddata=true on [your_field] in order to load fielddata in memory(text 字段默认禁用 fielddata)
- search_phase_execution_exceptionsearch_phase_execution_exception: all shards failed / Failed to execute phase [query](所有分片均失败 / 执行 [query] 阶段失败)
- too_many_clausestoo_many_clauses: maxClauseCount is set to 1024 (query contains too many clauses)(查询包含的子句过多)
- document_missing_exceptiondocument_missing_exception: [_doc][id]: document missing(文档不存在)
- index_not_found_exceptionindex_not_found_exception: no such index [index_name] (HTTP 404)(索引不存在)
- resource_already_exists_exceptionresource_already_exists_exception: index [index_name/uuid] already exists (HTTP 400)(索引已存在)
- cluster_health_redcluster health status: RED / unassigned shards(集群健康状态:RED / 未分配的分片)