Skip to content

Commit

Permalink
Retry ES API calls that fail with 410/Gone (elastic#56950) (elastic#5…
Browse files Browse the repository at this point in the history
…7085)

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
  • Loading branch information
rudolf and elasticmachine authored Feb 7, 2020
1 parent 5441541 commit 5acd24d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/core/server/elasticsearch/retry_call_cluster.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ describe('migrationsRetryCallCluster', () => {
'RequestTimeout',
'AuthenticationException',
'AuthorizationException',
'Gone',
];

const mockLogger = loggingServiceMock.create();
Expand Down
4 changes: 3 additions & 1 deletion src/core/server/elasticsearch/retry_call_cluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ export function migrationsRetryCallCluster(
error instanceof esErrors.ServiceUnavailable ||
error instanceof esErrors.RequestTimeout ||
error instanceof esErrors.AuthenticationException ||
error instanceof esErrors.AuthorizationException
error instanceof esErrors.AuthorizationException ||
// @ts-ignore
error instanceof esErrors.Gone
);
},
timer(delay),
Expand Down

0 comments on commit 5acd24d

Please sign in to comment.