版本: 6.8-8.9
简而言之,当 Elasticsearch 无法从事务日志(translog)读取操作时会出现此错误。这可能是由于事务日志损坏、磁盘 I/O 问题或 Elasticsearch 中的 bug 导致的。要解决此问题,您可以尝试恢复事务日志、检查磁盘 I/O 问题,或将 Elasticsearch 升级到最新版本。如果问题持续存在,您可能需要重新索引数据。
日志上下文 #
日志 “failed to read operation from translog” 类名是 InternalEngine.java. 我们从 Elasticsearch 源代码中提取了以下内容,供那些寻求深入了解的人参考:
if (operation != null) {
return getFromTranslog(get, (Translog.Index) operation, mappingLookup, documentParser, searcherWrapper);
}
} catch (IOException e) {
maybeFailEngine("realtime_get", e); // lets check if the translog has failed with a tragic event
throw new EngineException(shardId, "failed to read operation from translog", e);
}
} else {
trackTranslogLocation.set(true);
// We need to start tracking translog locations in the live version map. Refresh and
// serve all the real-time gets with a missing translog location from the internal searcher





