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

BUGFIX: Set up missing alias during node indexing #373

Merged
merged 6 commits into from
Feb 13, 2021

Conversation

kdambekalns
Copy link
Member

@kdambekalns kdambekalns commented Feb 11, 2021

Fixes #370

The command `nodeindex:build` does not set up aliases after creating
fresh indexes until it considers the indexing complete. This is good,
usually, since it allows for indexing "in the background". But if no
aliases exist at all, this is going to break.

This change fixes that by setting up aliases after creating (fresh)
indexes, if no aliases exist.

Fixes Flowpack#370
@kdambekalns kdambekalns self-assigned this Feb 11, 2021
With this change running `nodeindex:indexnode`

- without `--postfix` uses existing aliases or creates a new postfix
  (like `nodeindex:build` does) and sets up aliases
- with `--postfix` given will use that postfix and not change aliases,
  as that's probably intended when passing the postfix manually

Fixes Flowpack#370
@kdambekalns kdambekalns marked this pull request as ready for review February 11, 2021 19:34
@kdambekalns
Copy link
Member Author

Not sure about lower branches… I am quite certain I saw this issue on older versions, but don't have a project at hand right now to verify. Also older versions (of Elasticsearch) are EOL anyway.

Copy link
Contributor

@daniellienert daniellienert left a comment

Choose a reason for hiding this comment

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

Looks good by reading, thanks Karsten

@kdambekalns
Copy link
Member Author

@daniellienert – You mentioned fixed tests on Slack, should that help with this PR? Any hints on what needs to be fixed?

@daniellienert
Copy link
Contributor

@kdambekalns rebase it in 7.0 should fix the Tests

@kdambekalns
Copy link
Member Author

rebase it in 7.0 should fix the Tests

That was easy… now I just needed to remove JSON_THROW_ON_ERROR again for PHP 7.2. 🤯

@daniellienert daniellienert merged commit abac40b into Flowpack:7.0 Feb 13, 2021
@kdambekalns kdambekalns deleted the bugfix/370-alias-creation branch February 15, 2021 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants