Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not wait for Elasticsearch reindex to finish #165

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Korbeil
Copy link
Member

@Korbeil Korbeil commented May 16, 2023

I have a use case where I don't care that the Elasticsearch reindex is done before switching the index as live. So I would like to make this change.

Hope this is fine to you guys ? :)

@@ -84,6 +84,10 @@ public function migrate(Index $currentIndex, array $params = [], array $context
throw new RuntimeException(sprintf('Reindex call failed. %s', $response->getError()));
}

if (!$waitForCompletion) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might also call $reindex->setWaitForCompletion() as well.

This may push some additional change in this method. The setWaitForCompletion() could always receive false, then this method performs what it needs based on the $waitForCompletion. Or we also could call setWaitForCompletion() passing $waitForCompletion value and let the lib do the "wait" for us.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants