You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Nitin Gupta (Jira)" <ji...@apache.org> on 2020/05/27 06:20:04 UTC

[jira] [Closed] (OAK-9004) Multitenant index name strategy with reindex support

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

Nitin Gupta closed OAK-9004.
----------------------------

> Multitenant index name strategy with reindex support
> ----------------------------------------------------
>
>                 Key: OAK-9004
>                 URL: https://issues.apache.org/jira/browse/OAK-9004
>             Project: Jackrabbit Oak
>          Issue Type: Task
>          Components: indexing
>            Reporter: Amrit Verma
>            Priority: Major
>             Fix For: 1.30.0
>
>         Attachments: OAK-9004.patch, OAK-9004_1.patch, OAK-9004_2.patch
>
>
> Index names in elastic follow the pattern *<name>-<reindex-count>*
> This has to be changed in order to support multi-tenancy.
> We need to pass a parameter with the customer ID so we can create indexes like *<customer>.<name>-<reindex-count>*.  ES indexes cannot be longer than 255 bytes and must comply with the following criteria [https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html#indices-create-api-path-params]
>  
> We need also to decide what to do on re-index. The simpler strategy would be to:
>  * create the new index
>  * move writes and reads to the new index
>  * delete old index
> A more sophisticated strategy could:
>  * create the new index
>  * move writes to the new index
>  * reads will continue to use the old index until the new one catches up
>  * when the new one is in sync, move reads to the new index & delete the old one
> Both strategies can be implemented using Aliases in Elasticsearch to avoid race conditions. To implement the second solution we need something that tells us when the new index has caught up with the initial load.



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