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
conflicts with existing mapping in other types: #22672
Comments
just a thought:
|
I try this and it is still no reproduce. can anybody share anything? |
@makeyang can you share a bit more context? is this a cluster with dedicated master nodes? is this an old index (created with <=1.x code). Since this is an initializing primary, it seems something happened before - was the cluster restarted? is this a restore from a snapshot? any networking issues? |
I paste 3 data&master nodes log here: |
This is a bug in the mapping code. I've got a simple reproduction on a single-node 2.1.0 cluster:
Then restart the node and see it fail recovering. If it does not fail the first time, restart a few more times, the failure depends on the order in which type mappings are applied, which is somewhat non-deterministic (hashmaps). The issue is that the mapping ends up with conflicting values for the "account" doc-values field (which is not properly detected by ES 2.1.0):
i.e. doc_values is enabled for the "account" field in type1 but disabled in type2, which is inconsistent. The validation only detects this based on the ordering in which type1 and type2 are applied when applying the mapping on the node. ES 2.4.4 updates the mapping correctly and yields the following consistent mapping after applying the above steps:
How to fix this? You can make the mapping consistent again by disabling doc_values for the form_index/lockUser field for all types in that index: In my above example, the mapping can be made consistent again by updating it as follows:
This command might fail the first time you execute it, as it runs again into the non-determinism issue. Just repeat the command a few times until you get Once the mapping has been fixed (and only thereafter), I recommend an upgrade to ES 2.4.4, preferably even to 5.x. |
@ywelsch curl -XPUT /my_index2/_mapping/type1 -d ' curl -XPUT /my_index2/_mapping/type2 -d ' and then I found that below issues are trying to fix mapping problem: so basiclly we can close this issue. |
Elasticsearch version:
2.1
Plugins installed: []
delete-by-query
elasticsearch-analysis-ik
repository-hdfs
JVM version:
8u60
OS version:
CentOS release 6.6 (Final)
Description of the problem including expected versus actual behavior:
server keep throw below exceptions:
Steps to reproduce:
I checked the code complete and it turns out it really hard to reproduce this issue:
add some data and then kill one data node. then update mapping
and restart the killed node which has translog in disk. but the mapping will be merged sinnce doc value can changed from enable to disable.
add some data and then kill one data node. then update mapping
then merge exception will throw on master node.
so can anybody help to investigate on this please?
The text was updated successfully, but these errors were encountered: