Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-100180

Creating a new portal instance in a clustered environment from a non master node create index with incorrect mappings

    Details

      Description

      When you create a new virtual instance from a non master node of a cluster index mapping are created incorrectly.

      The listener in charge of create the index only runs from master node.

      Steps to reproduce:

      Start a two node cluster of Liferay.
      Node 1 (first to start will be the master node of the cluster)
      Node 2
      Connect to a remote Elasticsearch for having clustered indexes.
      Create a new virtual instance in node 2 (slave node)

      In ElasticSearch logs we will observe this trace:

      [INFO ][o.e.c.m.MetaDataCreateIndexService] [VLKs2wN] [liferay-XXXX] creating index, cause [auto(bulk api)], templates [], shards [5]/[1], mappings []

      This is due to ElasticSearch is auto creating index instead of waiting for liferay CreateIndexRequest.

      If we take a look at liferay-XXXXX index mappings with the next call:

      _http://elasticsearch-ip:9200/liferay-*/_mapping

      Mapping for lastName

      Expected result:

      "lastName":

      {"type":"text","store":true}

      ,"lastName_sortable":

      {"type":"keyword","store":true}

      Current Result:

      lastName":{"type":"text","fields":{"keyword":

      {"type":"keyword","ignore_above":256}

      }},"lastName_sortable":{"type":"text","fields":{"keyword":

      {"type":"keyword","ignore_above":256}

      }},
       

      In 7.1 and above this issue doesn't occurs due to changes made by https://issues.liferay.com/browse/LPS-84409

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  8 weeks, 6 days ago

                  Packages

                  Version Package
                  7.0.0 DXP FP86
                  7.0.X