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

Error when --es.use-ilm is set without --es.use-aliases #2814

Closed
albertteoh opened this issue Feb 15, 2021 · 3 comments · Fixed by #2820
Closed

Error when --es.use-ilm is set without --es.use-aliases #2814

albertteoh opened this issue Feb 15, 2021 · 3 comments · Fixed by #2820

Comments

@albertteoh
Copy link
Contributor

albertteoh commented Feb 15, 2021

Requirement - what kind of business use case are you trying to solve?

--es.use-ilm must always be used in conjunction with --es.use-aliases to ensure ES writers and readers refer to the single index mapping. Otherwise, ILM will not work as it does not have a rollover alias to work on.

As such, we should provide a useful error to users who mistakenly set --es.use-ilm without enabling --es.use-aliases.

This is a follow-up task to this PR review comment.

Proposal - what do you suggest to solve the problem or improve the existing situation?

The proposal is to add validation at the top of each ES reader and writer constructor with the following logic:

if cfg.GetUseILM() && !cfg.GetUseReadWriteAliases() {
	return nil, fmt.Errorf("the error message")
}
@bhiravabhatla
Copy link
Contributor

Will pick this up

@bhiravabhatla
Copy link
Contributor

Error message could be (from description) - "--es.use-ilm must always be used in conjunction with --es.use-aliases to ensure ES writers and readers refer to the single index mapping"?

@yurishkuro
Copy link
Member

+1

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 a pull request may close this issue.

3 participants