Skip to content

Commit

Permalink
Retry ES API calls that fail with 410/Gone (#56950)
Browse files Browse the repository at this point in the history
Co-authored-by: Elastic Machine <[email protected]>
  • Loading branch information
rudolf and elasticmachine authored Feb 7, 2020
1 parent 07cb4c1 commit 4efd26a
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 @@ -62,7 +62,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 4efd26a

Please sign in to comment.