You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@unomi.apache.org by "Serge Huber (Jira)" <ji...@apache.org> on 2021/10/14 09:34:00 UTC

[jira] [Updated] (UNOMI-516) Error in migration from 1.4 to 1.5 when patches have been used

     [ https://issues.apache.org/jira/browse/UNOMI-516?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Serge Huber updated UNOMI-516:
------------------------------
    Summary: Error in migration from 1.4 to 1.5 when patches have been used  (was: Error in migration from 1.4 to 1.5 when no import/export configs have been used)

> Error in migration from 1.4 to 1.5 when patches have been used
> --------------------------------------------------------------
>
>                 Key: UNOMI-516
>                 URL: https://issues.apache.org/jira/browse/UNOMI-516
>             Project: Apache Unomi
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.5.7
>            Reporter: Serge Huber
>            Priority: Major
>             Fix For: 2.0.0, 1.6.0
>
>         Attachments: unomierror.png
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> When migrating from 1.4 with a dataset that never used import / export conditions and possibly other indexes that have empty property mappings the following error occurs:
> !unomierror.png!
> A workaround is to force some mappings to exist for example with the following request:
> {code}
> curl -X PUT "localhost:9210/context/_mapping/patch?pretty" -H 'Content-Type: application/json' -d'
> {
>   "dynamic_templates": [
>     {
>       "all": {
>         "match": "*",
>         "match_mapping_type": "string",
>         "mapping": {
>           "type": "text",
>           "analyzer": "folding",
>           "fields": {
>             "keyword": {
>               "type": "keyword",
>               "ignore_above": 256
>             }
>           }
>         }
>       }
>     }
>   ],
>   "properties": {
>     "patchedItemId": {
>       "type": "text"
>     },
>     "patchedItemType": {
>       "type": "text"
>     },
>     "operation": {
>       "type": "text"
>     },
>     "data": {
>       "type": "object"
>     },
>     "lastApplication": {
>       "type": "date"
>     }
>   }
> }
> '
> {code}
> Here's the full procedure for upgrading from 1.4.0 to 1.5.x using the above request: 
> # We are assuming the following start state: both Unomi versions are shutdown or uninstalled and both ES version are shutdown or uninstalled.
> # If needed purge ES 7 install by shutting it down and deleting the "data" directory : TARGET_ES: rm -rf data
> # Make sure your ES 5 config/elasticsearch.yml looks something like this:
> cluster.name: contextElasticSearch
> http.port: 9210
> transport.tcp.port: 9310
> # Make sure your ES 7 config/elasticsearch.yml contains the following settings: 
> reindex.remote.whitelist: "localhost:9210"
> # Start ES 7 : TARGET_ES: bin/elasticsearch
> # Start ES 5 : SOURCE_ES: bin/elasticsearch
> # Assuming ES 5 is on port 9210, execute the above CURL request
> # Uncompress Unomi 1.5.7 or at the very least remove its "data" directory. UNOMI_1.5.7: rm -rf data
> # Start Unomi 1.5.7 with : bin/karaf
> # Type in Unomi 1.5.7 console: migrate 1.4.0
> # Answer all prompts, and now the migration should complete successfully.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)