Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a890cd8

Browse files
BaurzhanSakharievmergify[bot]
authored andcommitted
Use isShardNotAvailable in maybeTemporary
Covers more errors related to shards unavailability
1 parent d9736d1 commit a890cd8

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

server/src/main/java/io/crate/exceptions/SQLExceptions.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,11 +171,8 @@ public static boolean isShardNotAvailable(final Throwable e) {
171171
*/
172172
public static boolean maybeTemporary(Throwable t) {
173173
return maybeTemporaryNetworkError(t)
174+
|| isShardNotAvailable(t)
174175
|| t instanceof ClusterBlockException
175-
|| t instanceof IndexNotFoundException
176-
|| t instanceof NoShardAvailableActionException
177-
|| t instanceof UnavailableShardsException
178-
|| t instanceof AlreadyClosedException
179176
|| t instanceof ElasticsearchTimeoutException;
180177
}
181178

0 commit comments

Comments
 (0)