Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-19192

Define Read and Write Elasticsearch index names to leverage alias

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 9.3
    • Component/s: Elasticsearch
    • Release Notes Description:
      Hide

      Reindexing the repository can be done with no downtime as new parameters have been added to the index descriptor:

      • manageAlias=true: Nuxeo will manages 2 aliases: one for searching using the name of the contrib (default to "nuxeo"), one for writing with a "-write" suffix ("nuxeo-write"), both aliases will point to the same index ("nuxeo-0000"). When reindexing the repository a new index is created ("nuxeo-0001") and the write alias is updated to use it, the search alias stay on the previous index ("nuxeo-0000"). Once indexing is termintated the search alias is updated to point to the new index (nuxeo-0001). It is up to the adminitrator to clean old non used index (keep the 2 last created for instance)
      • writeAlias: When specified the write is done on this alias, nuxeo will not manage any aliases. The use case is for managing time based index for audit, one can create a new index every month the search alias can point to multiple indexes.
      Show
      Reindexing the repository can be done with no downtime as new parameters have been added to the index descriptor: manageAlias=true: Nuxeo will manages 2 aliases: one for searching using the name of the contrib (default to "nuxeo"), one for writing with a "-write" suffix ("nuxeo-write"), both aliases will point to the same index ("nuxeo-0000"). When reindexing the repository a new index is created ("nuxeo-0001") and the write alias is updated to use it, the search alias stay on the previous index ("nuxeo-0000"). Once indexing is termintated the search alias is updated to point to the new index (nuxeo-0001). It is up to the adminitrator to clean old non used index (keep the 2 last created for instance) writeAlias: When specified the write is done on this alias, nuxeo will not manage any aliases. The use case is for managing time based index for audit, one can create a new index every month the search alias can point to multiple indexes.
    • Sprint:
      nxcore 9.3.8
    • Story Points:
      3

      Description

      An alias can point to multiple indexes on search operation.
      But write operation requires a single index.
      So we need 2 index names.

      By using 2 alias names we can manage complex cases, like:

      • Reindex repository without downtime:
        • On reindexing create a new index and point write alias to it
        • When completed point the search alias to the new index
        • The old index can be dropped

      Note that searches that occur during reindexing will not match documents modified or created during reindexing, this is still better as seeing only the reindexed one.

      • Archived or limited Audit:
        By pointing the write index alias to a new index every month and defining a search alias over the 12 last index we limit the audit to the last year.
        Note that this administration task can be done outside of Nuxeo, it is just manipulating alias definition here.


      New parameters have been added to the index descriptor:

      • manageAlias=true: Nuxeo will manages 2 aliases: one for searching using the name of the contrib (default to "nuxeo"), one for writing with a "-write" suffix ("nuxeo-write"), both aliases will point to the same index ("nuxeo-0000"). When reindexing the repository a new index is created ("nuxeo-0001") and the write alias is updated to use it, the search alias stay on the previous index ("nuxeo-0000"). Once indexing is termintated the search alias is updated to point to the new index (nuxeo-0001). It is up to the adminitrator to clean old non used index (keep the 2 last created for instance)
      • writeAlias: When specified the write is done on this alias, nuxeo will not manage any aliases. The use case is for managing time based index for audit, one can create a new index every month the search alias can point to multiple indexes.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 day, 1 hour
                  1d 1h