Quiet down shard lock failures (#46368)
These were actually never intended to be logged at the warning level but made visible by a refactoring in #19991, which introduced a new exception type but forgot to adapt some of the consumers of the exception.
This commit is contained in:
parent
999658826f
commit
7e4c633ce3
|
@ -25,7 +25,6 @@ import org.apache.logging.log4j.message.ParameterizedMessage;
|
||||||
import org.apache.lucene.index.DirectoryReader;
|
import org.apache.lucene.index.DirectoryReader;
|
||||||
import org.apache.lucene.index.IndexReader.CacheHelper;
|
import org.apache.lucene.index.IndexReader.CacheHelper;
|
||||||
import org.apache.lucene.store.AlreadyClosedException;
|
import org.apache.lucene.store.AlreadyClosedException;
|
||||||
import org.apache.lucene.store.LockObtainFailedException;
|
|
||||||
import org.apache.lucene.util.CollectionUtil;
|
import org.apache.lucene.util.CollectionUtil;
|
||||||
import org.apache.lucene.util.RamUsageEstimator;
|
import org.apache.lucene.util.RamUsageEstimator;
|
||||||
import org.elasticsearch.ElasticsearchException;
|
import org.elasticsearch.ElasticsearchException;
|
||||||
|
@ -806,7 +805,7 @@ public class IndicesService extends AbstractLifecycleComponent
|
||||||
nodeEnv.deleteIndexDirectorySafe(index, 0, indexSettings);
|
nodeEnv.deleteIndexDirectorySafe(index, 0, indexSettings);
|
||||||
}
|
}
|
||||||
success = true;
|
success = true;
|
||||||
} catch (LockObtainFailedException ex) {
|
} catch (ShardLockObtainFailedException ex) {
|
||||||
logger.debug(() -> new ParameterizedMessage("{} failed to delete index store - at least one shards is still locked", index),
|
logger.debug(() -> new ParameterizedMessage("{} failed to delete index store - at least one shards is still locked", index),
|
||||||
ex);
|
ex);
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
|
|
|
@ -22,7 +22,6 @@ package org.elasticsearch.indices.cluster;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
import org.apache.logging.log4j.message.ParameterizedMessage;
|
import org.apache.logging.log4j.message.ParameterizedMessage;
|
||||||
import org.apache.lucene.store.LockObtainFailedException;
|
|
||||||
import org.elasticsearch.ResourceAlreadyExistsException;
|
import org.elasticsearch.ResourceAlreadyExistsException;
|
||||||
import org.elasticsearch.action.ActionListener;
|
import org.elasticsearch.action.ActionListener;
|
||||||
import org.elasticsearch.action.support.replication.ReplicationResponse;
|
import org.elasticsearch.action.support.replication.ReplicationResponse;
|
||||||
|
@ -354,7 +353,7 @@ public class IndicesClusterStateService extends AbstractLifecycleComponent imple
|
||||||
// holding on to the lock due to a "currently canceled recovery" or so. The shard will delete itself BEFORE the
|
// holding on to the lock due to a "currently canceled recovery" or so. The shard will delete itself BEFORE the
|
||||||
// lock is released so it's guaranteed to be deleted by the time we get the lock
|
// lock is released so it's guaranteed to be deleted by the time we get the lock
|
||||||
indicesService.processPendingDeletes(index, indexSettings, new TimeValue(30, TimeUnit.MINUTES));
|
indicesService.processPendingDeletes(index, indexSettings, new TimeValue(30, TimeUnit.MINUTES));
|
||||||
} catch (LockObtainFailedException exc) {
|
} catch (ShardLockObtainFailedException exc) {
|
||||||
logger.warn("[{}] failed to lock all shards for index - timed out after 30 seconds", index);
|
logger.warn("[{}] failed to lock all shards for index - timed out after 30 seconds", index);
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
logger.warn("[{}] failed to lock all shards for index - interrupted", index);
|
logger.warn("[{}] failed to lock all shards for index - interrupted", index);
|
||||||
|
|
Loading…
Reference in New Issue