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.IndexReader.CacheHelper;
|
||||
import org.apache.lucene.store.AlreadyClosedException;
|
||||
import org.apache.lucene.store.LockObtainFailedException;
|
||||
import org.apache.lucene.util.CollectionUtil;
|
||||
import org.apache.lucene.util.RamUsageEstimator;
|
||||
import org.elasticsearch.ElasticsearchException;
|
||||
|
@ -806,7 +805,7 @@ public class IndicesService extends AbstractLifecycleComponent
|
|||
nodeEnv.deleteIndexDirectorySafe(index, 0, indexSettings);
|
||||
}
|
||||
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),
|
||||
ex);
|
||||
} catch (Exception ex) {
|
||||
|
|
|
@ -22,7 +22,6 @@ package org.elasticsearch.indices.cluster;
|
|||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.logging.log4j.message.ParameterizedMessage;
|
||||
import org.apache.lucene.store.LockObtainFailedException;
|
||||
import org.elasticsearch.ResourceAlreadyExistsException;
|
||||
import org.elasticsearch.action.ActionListener;
|
||||
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
|
||||
// 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));
|
||||
} catch (LockObtainFailedException exc) {
|
||||
} catch (ShardLockObtainFailedException exc) {
|
||||
logger.warn("[{}] failed to lock all shards for index - timed out after 30 seconds", index);
|
||||
} catch (InterruptedException e) {
|
||||
logger.warn("[{}] failed to lock all shards for index - interrupted", index);
|
||||
|
|
Loading…
Reference in New Issue