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

版本: 7.8-8.9

简要来说,当Elasticsearch尝试为临时索引创建分片时会发生此错误,这不是一个标准的操作。临时索引通常用于临时操作,不应该需要创建分片。这可能是由于配置错误或系统中的bug导致的。要解决此问题,您可以:1) 检查您的索引设置,确保不会为临时索引触发分片创建。2) 检查您的Elasticsearch版本并在必要时更新,因为这可能是已知问题,在后续版本中已修复。3) 调试您的代码以识别任何触发分片创建的错误操作。

日志上下文 #

日志"temp index should not trigger shard creation [{}]“的类名是 IndicesService.java。 我们从Elasticsearch源代码中提取了以下内容,供那些寻求深入了解上下文的人参考:

// double check that shard is not created.
 new IndexEventListener() {
 @Override
 public void beforeIndexShardCreated(ShardRouting shardRouting; Settings indexSettings) {
 assert false : "temp index should not trigger shard creation";
 throw new ElasticsearchException("temp index should not trigger shard creation [{}]"; index);
 }  @Override
 public void onStoreCreated(ShardId shardId) {
 assert false : "temp index should not trigger store creation";