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

Sharding is creating some ClassName entries in not default shard on startup

    Details

    • Fix Priority:
      3
    • JDK:
      Oracle Sun JDK 7
    • Application Servers:
      Apache Tomcat 7.0.42
    • Databases:
      MySQL 5.6

      Description

      Steps to reproduce:

      1. Configure portal-ext with three shards (default, one, two), as described below, using as database names: lportal_master_s0, lportal_master_s1 and lportal_master_s2
      2. Regenerate databases, so the portal will recreate them on startup
      3. Start the portal
      4. See MySQL databases to verify data has been created on the wrong shard
        • select * from lportal_master_s2.ClassName_;

      Expected behavior: no records found
      Actual behavior: There is one record on the lportal_master_s2.ClassName_, with values ('0', '10001', 'com.liferay.portal.model.Group').

      In fact, the model.Group record is present on lportal_master_s0.ClassName_, but with other classNameId ('0', '10201', 'com.liferay.portal.model.Group')

      portal-ext.properties
      jdbc.default.driverClassName=com.mysql.jdbc.Driver
      jdbc.default.url=jdbc:mysql://localhost/lportal_master_s0?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
      jdbc.default.username=user
      jdbc.default.password=password
      
      jdbc.one.driverClassName=com.mysql.jdbc.Driver
      jdbc.one.url=jdbc:mysql://localhost/lportal_master_s1?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
      jdbc.one.username=user
      jdbc.one.password=password
      
      jdbc.two.driverClassName=com.mysql.jdbc.Driver
      jdbc.two.url=jdbc:mysql://localhost/lportal_master_s2?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
      jdbc.two.username=user
      jdbc.two.password=password
      
      spring.configs=\
              META-INF/base-spring.xml,\
              \
              META-INF/hibernate-spring.xml,\
              META-INF/infrastructure-spring.xml,\
              META-INF/management-spring.xml,\
              \
              META-INF/util-spring.xml,\
              \
              META-INF/executor-spring.xml,\
              \
              META-INF/audit-spring.xml,\
              META-INF/cluster-spring.xml,\
              META-INF/comment-spring.xml,\
              META-INF/jcr-spring.xml,\
              META-INF/ldap-spring.xml,\
              META-INF/messaging-core-spring.xml,\
              META-INF/messaging-misc-spring.xml,\
              META-INF/mobile-device-spring.xml,\
              META-INF/model-listener-spring.xml,\
              META-INF/notifications-spring.xml,\
              META-INF/poller-spring.xml,\
              META-INF/rules-spring.xml,\
              META-INF/scheduler-spring.xml,\
              META-INF/search-spring.xml,\
              META-INF/service-configurator-spring.xml,\
              META-INF/workflow-spring.xml,\
              \
              META-INF/counter-spring.xml,\
              META-INF/mail-spring.xml,\
              META-INF/portal-spring.xml,\
              META-INF/portlet-container-spring.xml,\
              META-INF/staging-spring.xml,\
              META-INF/virtual-layouts-spring.xml,\
              \
              META-INF/monitoring-spring.xml,\
              \
              #META-INF/dynamic-data-source-spring.xml,\
              META-INF/shard-data-source-spring.xml,\
              \
              classpath*:META-INF/ext-spring.xml
      

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  5 years, 1 week ago

                  Packages

                  Version Package