|
@@ -301,6 +301,7 @@ public class IndexService extends AbstractIndexComponent implements IndexCompone
|
|
|
Injector shardInjector = null;
|
|
|
try {
|
|
|
lock = nodeEnv.shardLock(shardId, TimeUnit.SECONDS.toMillis(5));
|
|
|
+ indicesLifecycle.beforeIndexShardCreated(shardId, indexSettings);
|
|
|
ShardPath path;
|
|
|
try {
|
|
|
path = ShardPath.loadShardPath(logger, nodeEnv, shardId, indexSettings);
|
|
@@ -325,7 +326,6 @@ public class IndexService extends AbstractIndexComponent implements IndexCompone
|
|
|
throw new IndexShardAlreadyExistsException(shardId + " already exists");
|
|
|
}
|
|
|
|
|
|
- indicesLifecycle.beforeIndexShardCreated(shardId, indexSettings);
|
|
|
logger.debug("creating shard_id {}", shardId);
|
|
|
// if we are on a shared FS we only own the shard (ie. we can safely delete it) if we are the primary.
|
|
|
final boolean canDeleteShardContent = IndexMetaData.isOnSharedFilesystem(indexSettings) == false ||
|