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

[jira] [Resolved] (UNOMI-498) index template name is hardcoded, it's breaking monthly index mapping when multiple unomi are using the same ElasticSearch

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

Kevan Jahanshahi resolved UNOMI-498.
------------------------------------
      Assignee: Kevan Jahanshahi
    Resolution: Fixed

> index template name is hardcoded, it's breaking monthly index mapping when multiple unomi are using the same ElasticSearch
> --------------------------------------------------------------------------------------------------------------------------
>
>                 Key: UNOMI-498
>                 URL: https://issues.apache.org/jira/browse/UNOMI-498
>             Project: Apache Unomi
>          Issue Type: Bug
>    Affects Versions: 1.5.6
>            Reporter: Kevan Jahanshahi
>            Assignee: Kevan Jahanshahi
>            Priority: Major
>             Fix For: 2.0.0, 1.6.0, 1.5.7
>
>         Attachments: Screenshot 2021-07-01 at 18.56.28.png
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> The issue is that the mapping is not correct for the monthly index like mentioned by David. And this can be confirmed using Kibana:
> GET /twuiysoaenpwj-event-date-2021-06/_mapping
> in the developer tools will give you the mapping, and we can clearly see that the mapping: GET /twuiysoaenpwj-event-date-2021-06/_mapping is correct but GET /twuiysoaenpwj-event-date-2021-07/_mapping is not correct. it's missing the analyzers.
> The reason why is because Unomi is creating index templates for this monthly indexes:
> !Screenshot 2021-07-01 at 18.56.28.png!
> AS you can see this index template have a strange name: context-event-date-template but it's a index patterns that only match a specific unomi context id.
> And this is the issue.
> Everytime a unomi is deployed on a Shared ElasticSearch it's overriding the index template of the other unomi instances already installed.
> because they always have the same name.
> Proof from the code Unomi ElasticSearchPersistenceServiceImpl.java:
>  
> {code:java}
> PutIndexTemplateRequest putIndexTemplateRequest = new PutIndexTemplateRequest("context-"+itemName+"-date-template")
> {code}
> Instead it should be:
>  
> {code:java}
> PutIndexTemplateRequest putIndexTemplateRequest = new PutIndexTemplateRequest(indexPrefix + "-" + itemName + "-date-template")
> {code}
> To avoid any conflicting index templates.
>  
>  



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