📣 极限科技诚招搜索运维工程师(Elasticsearch/Easysearch)- 全职/北京 👉 : 立即申请加入

版本: 6.8-7.15

简而言之,当Elasticsearch更新其索引映射耗时过长时,会出现此错误,可能是由于繁重的索引负载或资源不足造成的。要解决此问题,可以增加映射更新的超时值、减少索引负载,或者扩展Elasticsearch集群以提供更多资源。此外,确保映射不会过于复杂,因为这也会降低更新速度。

日志上下文 #

日志"timed out waiting for mapping updates"的类名是 PeerRecoveryTargetService.java。我们从Elasticsearch源代码中提取了以下内容,供那些寻求深入背景的人参考:

}  @Override
 public void onTimeout(TimeValue timeout) {
 // note that we do not use a timeout (see comment above)
 listener.onFailure(new ElasticsearchTimeoutException("timed out waiting for mapping updates " +
 "(timeout [" + timeout + "])"));
 }
 });
 };
 final IndexMetadata indexMetadata = clusterService.state().metadata().index(request.shardId().getIndex());