Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ public enum ReferenceDocs {
ALLOCATION_EXPLAIN_MAX_RETRY,
SECURE_SETTINGS,
CLUSTER_SHARD_LIMIT,
DELETE_INDEX_BLOCK,
// this comment keeps the ';' on the next line so every entry above has a trailing ',' which makes the diff for adding new links cleaner
;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,5 @@ CIRCUIT_BREAKER_ERRORS troubleshoot/ela
ALLOCATION_EXPLAIN_NO_COPIES troubleshoot/elasticsearch/diagnose-unassigned-shards#no-shard-copy
ALLOCATION_EXPLAIN_MAX_RETRY troubleshoot/elasticsearch/diagnose-unassigned-shards#maximum-retries-exceeded
SECURE_SETTINGS deploy-manage/security/secure-settings
CLUSTER_SHARD_LIMIT reference/elasticsearch/configuration-reference/miscellaneous-cluster-settings#cluster-shard-limit
CLUSTER_SHARD_LIMIT reference/elasticsearch/configuration-reference/miscellaneous-cluster-settings#cluster-shard-limit
DELETE_INDEX_BLOCK api/doc/elasticsearch/operation/operation-indices-remove-block
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import org.elasticsearch.action.support.WriteRequest;
import org.elasticsearch.client.internal.Client;
import org.elasticsearch.common.CheckedSupplier;
import org.elasticsearch.common.ReferenceDocs;
import org.elasticsearch.common.util.concurrent.AbstractRunnable;
import org.elasticsearch.common.util.concurrent.EsRejectedExecutionException;
import org.elasticsearch.common.util.concurrent.ThreadContext;
Expand Down Expand Up @@ -196,15 +197,21 @@ private void deleteOlderSnapshotDoc(SearchResponse searchResponse, Consumer<Exce
);
}
}, e -> {
logger.warn(
() -> format(
logger.warn(() -> {
String baseMessage = format(
"[%s] [%s] failed to delete old snapshot [%s] result document",
jobId,
snapshotId,
ModelSizeStats.RESULT_TYPE_FIELD.getPreferredName()
),
e
);
);
if (e instanceof org.elasticsearch.cluster.block.ClusterBlockException) {
return baseMessage
+ ". Remove the write block from the results index to delete the model snapshot. See "
+ ReferenceDocs.DELETE_INDEX_BLOCK
+ " for details.";
}
return baseMessage;
}, e);
}), () -> runAfter.accept(null)));
}

Expand Down