translog_corrupted_exception: translog_corrupted_exception
Elasticsearch의미
샤드의 트랜잭션 로그(translog)가 손상되어 읽을 수 없다. 복구 중 Elasticsearch가 translog의 무결성 검사 실패를 감지해 샤드를 시작할 수 없었다.
원인
translog 파일은 보통 갑작스러운 정전, 디스크 가득 참, 파일 시스템 오류, 하드웨어/디스크 장애, 또는 데이터 디렉터리에 대한 외부 작업(복사, 수동 개입)으로 손상된다. 강제 종료(kill -9) 중 부분적으로 완료된 쓰기도 원인이 될 수 있다.
해결 방법
먼저 replica나 스냅샷에서 데이터를 복구해 본다. 정상 복사본이 있다면 이를 이용해 손상된 샤드를 재구축하는 것이 가장 안전하다. 다른 복사본이 없고 데이터 손실을 감수한다면 노드를 중지하고 bin/elasticsearch-shard remove-corrupted-data --index <index> --shard-id <n>으로 손상된 translog/데이터를 정리한다(아직 커밋되지 않은 데이터는 영구 손실된다. 이전 elasticsearch-translog 도구는 7.0에서 제거되었다). 도구는 노드 재시작 후 샤드를 할당하는 데 필요한 POST _cluster/reroute 명령(allocate_stale_primary, accept_data_loss: true)을 출력한다. 작업 전에 데이터 디렉터리를 백업한다. 디스크 상태와 여유 공간을 확인한다.
같은 데이터베이스의 다른 항목
- illegal_argument_exception_total_fieldsLimit of total fields has been exceeded
- verification_exceptionverification_exception: Found N problem(s) — Unknown column / Unknown index (ES|QL, SQL, EQL) (N개 문제 발견 — 알 수 없는 컬럼/인덱스)
- bind_transport_exceptionbind_transport_exception (Address already in use) (주소가 이미 사용 중)
- recovery_engine_exceptionrecovery_engine_exception
- snapshot_in_progress_exceptionsnapshot_in_progress_exception
- repository_verification_exceptionrepository_verification_exception
- reduce_search_phase_exceptionreduce_search_phase_exception