Temp index should not trigger shard creation – How to solve this Elasticsearch exception

Opster Team

August-23, Version: 7.8-8.9

Briefly, this error occurs when Elasticsearch attempts to create a shard for a temporary index, which is not a standard operation. Temporary indices are typically used for transient operations and should not require shard creation. This could be due to a misconfiguration or a bug in the system. To resolve this issue, you can 1) Review your index settings and ensure that no shard creation is triggered for temporary indices. 2) Check your Elasticsearch version and update it if necessary, as this could be a known issue fixed in a later version. 3) Debug your code to identify any erroneous operations triggering shard creation.

This guide will help you check for common problems that cause the log ” temp index should not trigger shard creation [{}] ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: shard, index, indices.

Log Context

Log “temp index should not trigger shard creation [{}]” class name is IndicesService.java. We extracted the following from Elasticsearch source code for those seeking an in-depth context :

 // 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";

 

 [ratemypost]