mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[Upgrade Assistant] Update logic for handling reindex failures (#125246)
This commit is contained in:
parent
3c47a05f7a
commit
9cba32e630
2 changed files with 3 additions and 7 deletions
|
@ -109,7 +109,6 @@ export const ChecklistFlyoutStep: React.FunctionComponent<{
|
|||
)}
|
||||
{(hasFetchFailed || hasReindexingFailed) && (
|
||||
<>
|
||||
<EuiSpacer />
|
||||
<EuiCallOut
|
||||
color="danger"
|
||||
iconType="alert"
|
||||
|
@ -130,6 +129,7 @@ export const ChecklistFlyoutStep: React.FunctionComponent<{
|
|||
>
|
||||
{reindexState.errorMessage}
|
||||
</EuiCallOut>
|
||||
<EuiSpacer />
|
||||
</>
|
||||
)}
|
||||
<EuiText>
|
||||
|
|
|
@ -293,12 +293,8 @@ export const reindexServiceFactory = (
|
|||
// Do any other cleanup work necessary
|
||||
reindexOp = await cleanupChanges(reindexOp);
|
||||
} else {
|
||||
// Check that it reindexed all documents
|
||||
const {
|
||||
body: { count },
|
||||
} = await esClient.count({ index: reindexOp.attributes.indexName });
|
||||
|
||||
if (taskResponse.task.status!.created < count) {
|
||||
// Check that no failures occurred
|
||||
if (taskResponse.response?.failures?.length) {
|
||||
// Include the entire task result in the error message. This should be guaranteed
|
||||
// to be JSON-serializable since it just came back from Elasticsearch.
|
||||
throw error.reindexTaskFailed(`Reindexing failed: ${JSON.stringify(taskResponse)}`);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue