translog_corrupted_exception: translog_corrupted_exception
Elasticsearch含义
由于分片的事务日志(translog)已损坏,无法读取。在恢复期间,Elasticsearch 检测到 translog 未通过完整性检查,分片无法启动。
原因
translog 文件通常因突然断电、磁盘写满、文件系统错误、硬件/磁盘故障或对数据目录的外部操作(复制、手动干预)而损坏。强制关闭(kill -9)期间部分完成的写入也可能导致此问题。
解决方法
首先尝试从副本或快照恢复数据;如果存在完好的副本,用它重建损坏的分片是最安全的途径。如果没有其他副本且您接受数据丢失,停止节点并用 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