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)으로 요청을 재시도한다(read-modify-write 루프). 자동 재시도에는 _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
- search_phase_execution_exceptionsearch_phase_execution_exception: all shards failed / Failed to execute phase [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 / 미할당 샤드)