Skip to content

No error when create index if there are nodes that have files and no files #23554

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

Open
johtani opened this issue Mar 12, 2017 · 6 comments
Open
Labels
>enhancement :Search Relevance/Analysis How text is split into tokens Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch

Comments

@johtani
Copy link
Contributor

johtani commented Mar 12, 2017

Elasticsearch version: 5.2.2

Description of the problem including expected versus actual behavior:

The situation is below:

  • Using mapping_char filter with mappings_path, e.g. fileA.txt
  • Elasticsearch has 2 nodes and a node has fileA.txt and another node does not have fileA.txt

Then, user can create an index with mapping_char filter if the master node gets the request and has fileA.txt, whether the number of replicas is 0 or not.
But, user cannot create an index if the master node gets the request and does not have fileA.txt

We should notify an error to user there are some strange nodes.

And if create an index with the number of shards = 2 and the number of replicas = 0 with 2 nodes cluster, RELOCATING is repeated indefinitely...

@johtani johtani added :Core/Infra/Settings Settings infrastructure and APIs >enhancement v5.2.2 labels Mar 12, 2017
@lewischen1123
Copy link

Interested in picking up this task. i want to have a try thx

@rjernst rjernst added the Team:Core/Infra Meta label for core/infra team label May 4, 2020
@rjernst rjernst added the needs:triage Requires assignment of a team area label label Dec 3, 2020
@gwbrown
Copy link
Contributor

gwbrown commented Dec 3, 2020

I've confirmed that this issue is still present in 7.10.0, at least the part about the file being required on the master node and odd errors occurring if the index is created and some nodes don't have the file.

I'm not sure if there's a great way to address this. I'm going to mark this team-discuss to see if we have any ideas for how it would be possible to alleviate this issue, as ensuring files are the same across nodes is a problem I've seen come up a few times.

@gwbrown gwbrown added team-discuss and removed v5.2.2 needs:triage Requires assignment of a team area label labels Dec 3, 2020
@gwbrown gwbrown self-assigned this Apr 14, 2021
@gwbrown
Copy link
Contributor

gwbrown commented Apr 14, 2021

We discussed this in the core/infra sync today.

Unfortunately, this problem is difficult to solve. Verifying that all nodes have the file would be a complex and possibly slow process, and by the time we have the mappings we've already passed most of the opportunities to do something at node start time.

The decision we reached was that we'll review the error messages that occur in both 1) the case that the master node does not have the file and rejects the index creation, and 2) the case that the index is created and one or more data nodes don't have the necessary file. As long as these error messages make the problem clear, ensuring the filesystem is in the correct state on each node is the responsibility of the cluster administrator, at least for now. We'd like to improve this in the future, but this is a complicated and difficult problem to solve in a way that would work well in all cases.

@ldematte ldematte added :StorageEngine/Mapping The storage related side of mappings >bug and removed :Core/Infra/Settings Settings infrastructure and APIs >enhancement labels Oct 25, 2024
@elasticsearchmachine elasticsearchmachine added Team:StorageEngine and removed Team:Core/Infra Meta label for core/infra team labels Oct 25, 2024
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-storage-engine (Team:StorageEngine)

@gwbrown gwbrown removed their assignment Oct 25, 2024
@martijnvg martijnvg added :Search Relevance/Analysis How text is split into tokens and removed :StorageEngine/Mapping The storage related side of mappings labels Apr 17, 2025
@elasticsearchmachine elasticsearchmachine added Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch and removed Team:StorageEngine labels Apr 17, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-search-relevance (Team:Search Relevance)

@martijnvg
Copy link
Member

Re-assigned the search relevance analysis label, given that this is an issue with the mapping char filter. If this is the wrong label, then please let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>enhancement :Search Relevance/Analysis How text is split into tokens Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch
Projects
None yet
Development

No branches or pull requests

8 participants