Skip to content

Commit 19c61e8

Browse files
authored
Remove deprecated exceptions (elastic#28059)
DeleteFailedEngineException and IndexFailedEngineException were deprecated in 6.0. This commit removes them entirely in 7.0.
1 parent 7cdbae2 commit 19c61e8

File tree

4 files changed

+4
-104
lines changed

4 files changed

+4
-104
lines changed

core/src/main/java/org/elasticsearch/ElasticsearchException.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -769,8 +769,7 @@ private enum ElasticsearchExceptionHandle {
769769
// 26 was BatchOperationException
770770
SNAPSHOT_CREATION_EXCEPTION(org.elasticsearch.snapshots.SnapshotCreationException.class,
771771
org.elasticsearch.snapshots.SnapshotCreationException::new, 27, UNKNOWN_VERSION_ADDED),
772-
DELETE_FAILED_ENGINE_EXCEPTION(org.elasticsearch.index.engine.DeleteFailedEngineException.class, // deprecated in 6.0, remove in 7.0
773-
org.elasticsearch.index.engine.DeleteFailedEngineException::new, 28, UNKNOWN_VERSION_ADDED),
772+
// 28 was DeleteFailedEngineException, deprecated in 6.0, removed in 7.0
774773
DOCUMENT_MISSING_EXCEPTION(org.elasticsearch.index.engine.DocumentMissingException.class,
775774
org.elasticsearch.index.engine.DocumentMissingException::new, 29, UNKNOWN_VERSION_ADDED),
776775
SNAPSHOT_EXCEPTION(org.elasticsearch.snapshots.SnapshotException.class,
@@ -866,8 +865,7 @@ private enum ElasticsearchExceptionHandle {
866865
org.elasticsearch.action.TimestampParsingException::new, 78, UNKNOWN_VERSION_ADDED),
867866
ROUTING_MISSING_EXCEPTION(org.elasticsearch.action.RoutingMissingException.class,
868867
org.elasticsearch.action.RoutingMissingException::new, 79, UNKNOWN_VERSION_ADDED),
869-
INDEX_FAILED_ENGINE_EXCEPTION(org.elasticsearch.index.engine.IndexFailedEngineException.class, // deprecated in 6.0, remove in 7.0
870-
org.elasticsearch.index.engine.IndexFailedEngineException::new, 80, UNKNOWN_VERSION_ADDED),
868+
// 80 was IndexFailedEngineException, deprecated in 6.0, removed in 7.0
871869
INDEX_SHARD_RESTORE_FAILED_EXCEPTION(org.elasticsearch.index.snapshots.IndexShardRestoreFailedException.class,
872870
org.elasticsearch.index.snapshots.IndexShardRestoreFailedException::new, 81, UNKNOWN_VERSION_ADDED),
873871
REPOSITORY_EXCEPTION(org.elasticsearch.repositories.RepositoryException.class,

core/src/main/java/org/elasticsearch/index/engine/DeleteFailedEngineException.java

Lines changed: 0 additions & 37 deletions
This file was deleted.

core/src/main/java/org/elasticsearch/index/engine/IndexFailedEngineException.java

Lines changed: 0 additions & 61 deletions
This file was deleted.

core/src/test/java/org/elasticsearch/ExceptionSerializationTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,7 @@ public void testIds() {
696696
ids.put(25, org.elasticsearch.script.GeneralScriptException.class);
697697
ids.put(26, null);
698698
ids.put(27, org.elasticsearch.snapshots.SnapshotCreationException.class);
699-
ids.put(28, org.elasticsearch.index.engine.DeleteFailedEngineException.class); //deprecated in 6.0
699+
ids.put(28, null); // was DeleteFailedEngineException, deprecated in 6.0 and removed in 7.0
700700
ids.put(29, org.elasticsearch.index.engine.DocumentMissingException.class);
701701
ids.put(30, org.elasticsearch.snapshots.SnapshotException.class);
702702
ids.put(31, org.elasticsearch.indices.InvalidAliasNameException.class);
@@ -748,7 +748,7 @@ public void testIds() {
748748
ids.put(77, org.elasticsearch.common.util.concurrent.UncategorizedExecutionException.class);
749749
ids.put(78, org.elasticsearch.action.TimestampParsingException.class);
750750
ids.put(79, org.elasticsearch.action.RoutingMissingException.class);
751-
ids.put(80, org.elasticsearch.index.engine.IndexFailedEngineException.class); //deprecated in 6.0
751+
ids.put(80, null); // was IndexFailedEngineException, deprecated in 6.0 and removed in 7.0
752752
ids.put(81, org.elasticsearch.index.snapshots.IndexShardRestoreFailedException.class);
753753
ids.put(82, org.elasticsearch.repositories.RepositoryException.class);
754754
ids.put(83, org.elasticsearch.transport.ReceiveTimeoutTransportException.class);

0 commit comments

Comments
 (0)