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
Creation of ES index fails if first mapping contains a map #249
Comments
Would you have the mapping error related to this issue ? |
Hi Vincent, the error message was like this (it´s an other table name but the same issue). Currently I am still not sure, what it the cause of the problem. In my case adding timeouts between adding mappings helped. When all of the mappings were in 1 call this problem occured each time.
|
Hi, You reported in your last message an error when inserting document while your initial issue was related to discover the mapping. In order to reproduce your issues, please reports error message and logs for the mapping issue (initial error), and information to reproduce the second error message (the mapping and the insert statement). |
Hi Vincent,
the issue did not reoccur. It looks like it is related to the ES indices
being created to fast each after other.
When I create the indices each with an own request the issue does not occur.
Alex
Am Mi., 13. Feb. 2019 um 10:03 Uhr schrieb Alex Tbk <hury@gmx.net>:
… Hi Vincent,
the issue did not reoccur. It looks like it is related to the ES indices
being created to fast each after other.
When I create the indices each with an own request the issue does not
occur.
Alex
Am Mi., 13. Feb. 2019 um 09:38 Uhr schrieb Vincent Royer <
***@***.***>:
> Hi,
>
> You reported in your last message an error when inserting document while
> your initial issue was related to discover the mapping.
>
> In order to reproduce your issues, please reports error message and logs
> for the mapping issue (initial error), and information to reproduce the
> second error message (the mapping and the insert statement).
> Thanks.
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#249 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/ABwCe2BBfYgn3ItqcOWlZKVwDOCQcP42ks5vM87rgaJpZM4ZZsud>
> .
>
|
Hi, I have to reopen this, as I encountered exactly the same issue with ES6 (elassandra 6.2.3.12).
It fails. In system.log I see:
This error continues then. From the logs I see that it complains about the "configuration" field of my device entity. Here is an example of an real entry for this field:
When I add the mapping with "configuration" column ignored, there are no errors. Please help |
Hi, Yes, there is an issue when creating the index with a populated map. To create your index without mapping the field configuration: Index should be green at this step, then to update mapping to add the configuration field: Then on every nodes, run the following command to rebuild the index: Thank's for reporting this issue. |
Hi Vincent, could you tell me, if this has been resolved in current releases? Thanks! |
Hi Alex, |
Hi Vincent, I am testing this with 6.2.3.15, the reported issue seems to be resolved.
The error I get:
I am inserting an empty entry, which contains only the id. |
Hi, after some more testing I can confirm, that the bug is still not fixed. This issue does not occur on a 1 node cluster, i was only able to observe it on a 2 node cluster with RF=2. Please please fix this Best regards |
The original bug is fixed, you get here another issue because your index was probably created with version 5.x (with multiple types per index). As elasticsearch 6.x, Elassandra only supports single type index, and Uid is only indexed in multiple types index (index < 6.0). The next version if fixed to avoid NPE, but we do not support hot ES index upgrade, because you can smoothly upgrade with multiple Cassandra datacenters... |
Hi,
I did not migrate the index.
I recreated the empty tables and copied the Cassandra directory contents.
The elastic directory was deleted.
Then I created the index and received the errors.
Alex
Vincent Royer <notifications@github.com> schrieb am Sa., 1. Juni 2019,
16:48:
… The original bug is fixed, you get here another issue because your index
was probably created with version 5.x (with multiple types per index). As
elasticsearch 6.x, Elassandra only supports single type index, and Uid is
only indexed in multiple types index (index < 6.0).
The next version if fixed to avoid NPE, but we do not support hot ES index
upgrade, because you can smoothly upgrade with multiple Cassandra
datacenters...
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#249?email_source=notifications&email_token=AAOAE66HR7GKQLRSMJCSSTDPYKD4XA5CNFSM4GLGZOO2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWXCBIA#issuecomment-497950880>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAOAE6523XH43XCABLGQTMLPYKD4XANCNFSM4GLGZOOQ>
.
|
Deleting the elastic directory does not delete your index settings where index version is recorded. |
Hi Vincent,
thank you for your reply.
Would you describe me, how you would update an existing cluster from
elassandra 5 to 6?
Thank you!
Am Mi., 26. Juni 2019 um 01:33 Uhr schrieb Vincent Royer <
notifications@github.com>:
… Deleting the elastic directory does not delete your index settings where
index version is recorded.
I don't really know how your recreate your index, but the error (NPE in
UidFieldMapper.java:236) cannot happen with ES 6.x index. We need more
details about this issue to explain or solve it.
Thanks.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#249?email_source=notifications&email_token=AAOAE642S2M73A2RVIBGQZTP4KTNPA5CNFSM4GLGZOO2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYR4HOA#issuecomment-505660344>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAOAE65KXO3VX2EOEJ7VTLDP4KTNPANCNFSM4GLGZOOQ>
.
|
1.Delete all you ES indices |
For me this issue is still there with 6.2.3.18
Note that this only occured as 3 nodes were started. |
Could you attach you mapping, your CQL schema and the logs containing errors. Could also provide the exact nodetool repair command you ran after changing the RF from 1 (i guess) to 3. Thanks. |
Error: (this continues with other tables containing maps, which are indexed in elastic as well). Devices Schema: Repair command: |
Hi Alex,
Before increasing the RF, your ES mapping should include all keys of your map as fields (all keys are indexed on at least one node). Then, all nodes should share the same ES mapping stored in the CQL schema, and repairs should not involve any mapping update.
I can can’t figure out which step is wrong, so could you check which condition is not met in your use case ?
Thanks,
Vincent Royer
http://www.strapdata.com
Mobile: +33 7 83 18 25 40
… Le 13 août 2019 à 17:02, Alex Tabaksmann ***@***.***> a écrit :
Error:
2019-08-13 07:09:35,988 WARN [elasticsearch[10.164.0.58][masterService#updateTask][T#1]] MasterService.java:282 runTasks failed to publish updated cluster state in [5s]: version [27], uuid [ASEADRK9SS-mPIOA6JLizg], source [put-mapping[devices]] cluster uuid: ae912935-612b-4ae6-ae2e-0c81126923cc version: 27 state uuid: ASEADRK9SS-mPIOA6JLizg from_diff: false meta data version: 75 [audit/XK9AXfrkRlmeGSQmSfRw7Q]: v[3] 0: p_term [0], isa_ids [] [it-derived_value_configuration_by_device/X6GGxLK2Rp60H43AlRi-Hw]: v[3] 0: p_term [0], isa_ids [] [alarms/jS5RrPqyRpKGJwKrWY5LJg]: v[3] 0: p_term [0], isa_ids [] [alarm_configurations/9nj0t0XXQCyrPeWloP1Drw]: v[3] 0: p_term [0], isa_ids [] [it-alarm_configurations/jGOV_Z4ISpaRqXMFj4u7WA]: v[3] 0: p_term [0], isa_ids [] [users/QFkU0VTmR_S2iWkWj6Jw4w]: v[3] 0: p_term [0], isa_ids [] [derived_value_configuration_by_device/R6hzV_DDSSWTxq_8XFi3bg]: v[4] 0: p_term [0], isa_ids [] at org.elasticsearch.cluster.service.TaskBatcher$BatchedTask.run(TaskBatcher.java:188) at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:573) at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.runAndClean(PrioritizedEsThreadPoolExecutor.java:244) at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:207) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: org.apache.cassandra.exceptions.WriteTimeoutException: Operation timed out - received only 0 responses. at org.apache.cassandra.service.paxos.AbstractPaxosCallback.await(AbstractPaxosCallback.java:64) at org.apache.cassandra.service.StorageProxy.preparePaxos(StorageProxy.java:489) at org.apache.cassandra.service.StorageProxy.beginAndRepairPaxos(StorageProxy.java:402) at org.apache.cassandra.service.StorageProxy.cas(StorageProxy.java:237) at org.apache.cassandra.cql3.statements.ModificationStatement.executeWithCondition(ModificationStatement.java:449) at org.apache.cassandra.cql3.statements.ModificationStatement.execute(ModificationStatement.java:424) at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:225) at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:256) at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:241) at org.elasticsearch.cluster.service.ClusterService.process(ClusterService.java:536) at org.elasticsearch.cluster.service.ClusterService.processWriteConditional(ClusterService.java:548) at org.elasticsearch.cluster.service.ClusterService.commitMetaData(ClusterService.java:1264) at org.elassandra.discovery.CassandraDiscovery.publishAsCoordinator(CassandraDiscovery.java:1002) ... 11 common frames omitted 2019-08-13 07:09:25,919 ERROR [MutationStage-32] ElasticSecondaryIndex.java:508 addField submapper not found for nested field [failedPacketsSinceStart] in index [devices]
(this continues with other tables containing maps, which are indexed in elastic as well).
failedPacketsSinceStart is a key inside the map in the devices table.
Devices Schema:
CREATE TABLE devices ( id uuid, children list<uuid>, comm_nr text, configuration map<text,text>, create_date_nanoseconds bigint, customer text, description text, groups list<text>, last_active text, last_active_nanoseconds bigint, location uuid, notes text, parent uuid, picture text, status text, tag text, thumbnail text, "type" text, "users" list<text>, PRIMARY KEY (id) )
Repair command:
nodetool repair
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Hi Vincent, i hope I dont mix things up. What happened is that our 5.5.0.24 cluster crashed with almost the same error but without an repair. In this state its impossible to delete the elastic index so you are kinda doomed. I started a 1 node cluster, imported 2 tables - both of them are small (<100) entries. The data was imported via the COPY command from .csv files, if that is important. I can even provide you the .csv data if it helps. Thanks for looking into that |
Hi Alex,
Thanks for this clarification.
How and when did you created your mapping ?
There is 2 valid scenario:
* A. Create your index with a discover when map are empty, then import your data.
* B. Create index with a mapping without the map field, then update the mapping to index map field and rebuild index on all nodes.
It seems that you played scenario B, and a PAXOS timeout occurs. Could you set your cas_contention_timeout_in_ms to 1000 or more in your cassandra.yaml. Thanks
… Le 13 août 2019 à 23:34, Alex Tabaksmann ***@***.***> a écrit :
Hi Vincent,
i hope I dont mix things up. What happened is that our 5.5.0.24 cluster crashed with almost the same error but without an repair. In this state its impossible to delete the elastic index so you are kinda doomed.
I started a 1 node cluster, imported 2 tables - both of them are small (<100) entries.
Then I started a second node. Changed RF=2. nodetool repair on node 2.
Then 3rd node with the same procedure and the errors came. It might be a coincidence but these errors are there.
The data was imported via the COPY command from .csv files, if that is important. I can even provide you the .csv data if it helps.
Thanks for looking into that
Alex
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Hi Vincent, i first imported the data (the map field is filled). Then i created the index with:
Alex |
Any news here? |
bump |
The default cas_contention_timeout_in_ms is 5000, but you should check your conf/cassandra.yaml file. Release 6.2.3.19 adds a new way to index map, with opaque_map, there is no more Elasticsearch mapping update (and no more PAXOS timeout). If you don't need to discover indexed fields through the elasticsearch mapping, this is probably a nice solution in your case. See documentation for details. |
Thank you! So searching with:
will be possible? |
Yes is fully searchable, you just need to know what are your field names (or key entries in the underlying cassandra map), as it is not more visible in the elasticsearch mapping. In the next release 6.2.3.20 (next week), aggregation on opaque_map keys will be supported too. |
Sounds awesome! |
Is there a specific update procedure to 6.2.3.20 when no maps are inside of any index? |
I can confirm this is fixed |
Version 5.5.0.24 Assume 2 Tables are given:
Indexing in this order will fail:
The text was updated successfully, but these errors were encountered: