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

Upgrade process fails partitioned database with "com.liferay.portal.upgrade.v7_4_x.UpgradeCompanyId"

    Details

      Description

      Steps to reproduce:

      1. Set "database.partition.enabled=true" properties in the portal-ext.properties
      2. Populate data for all the schemas with the attached data
      3. Also, set "database.partition.enabled=true" in the portal-upgrade-ext.properties
      4. Run upgrade tool to upgrade to the master

      Expected result:
      Partitioned database upgrades without error.

      Actual result:

      2021-07-20 17:24:13.761 INFO  [main][UpgradeProcess:126] Failed upgrade process com.liferay.portal.upgrade.v7_4_x.UpgradeCompanyId in 172 ms
      2021-07-20 17:24:13.761 INFO  [main][UpgradeProcess:126] Failed upgrade process com.liferay.portal.upgrade.PortalUpgradeProcess in 6799 ms
      com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: java.sql.SQLException: 'lpartition_39083.PortalPreferences' is not BASE TABLE
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:120)
      	at com.liferay.portal.kernel.upgrade.util.UpgradeProcessUtil._upgradeProcess(UpgradeProcessUtil.java:173)
      	at com.liferay.portal.kernel.upgrade.util.UpgradeProcessUtil.upgradeProcess(UpgradeProcessUtil.java:136)
      	at com.liferay.portal.events.StartupHelperUtil.upgradeProcess(StartupHelperUtil.java:172)
      	at com.liferay.portal.tools.DBUpgrader._upgradePortal(DBUpgrader.java:400)
      	at com.liferay.portal.tools.DBUpgrader.upgrade(DBUpgrader.java:170)
      	at com.liferay.portal.tools.DBUpgrader.upgrade(DBUpgrader.java:162)
      	at com.liferay.portal.tools.DBUpgrader.main(DBUpgrader.java:136)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at com.liferay.portal.tools.db.upgrade.client.DBUpgraderLauncher.main(DBUpgraderLauncher.java:54)
      Caused by: com.liferay.portal.kernel.upgrade.UpgradeException: java.sql.SQLException: 'lpartition_39083.PortalPreferences' is not BASE TABLE
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:120)
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:142)
      	at com.liferay.portal.upgrade.PortalUpgradeProcess.doUpgrade(PortalUpgradeProcess.java:137)
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.lambda$upgrade$0(UpgradeProcess.java:114)
      	at com.liferay.portal.db.partition.DBPartitionUtil.forEachCompanyId(DBPartitionUtil.java:119)
      	at com.liferay.portal.dao.db.BaseDB.process(BaseDB.java:307)
      	at com.liferay.portal.kernel.dao.db.BaseDBProcess.process(BaseDBProcess.java:228)
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:101)
      	... 12 more
      Caused by: java.sql.SQLException: 'lpartition_39083.PortalPreferences' is not BASE TABLE
      	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129)
      	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
      	at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
      	at com.mysql.cj.jdbc.StatementImpl.executeUpdateInternal(StatementImpl.java:1335)
      	at com.mysql.cj.jdbc.StatementImpl.executeLargeUpdate(StatementImpl.java:2108)
      	at com.mysql.cj.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1245)
      	at com.zaxxer.hikari.pool.ProxyStatement.executeUpdate(ProxyStatement.java:117)
      	at com.zaxxer.hikari.pool.HikariProxyStatement.executeUpdate(HikariProxyStatement.java)
      	at com.liferay.portal.dao.db.BaseDB.runSQL(BaseDB.java:348)
      	at com.liferay.portal.dao.db.BaseDB.runSQL(BaseDB.java:314)
      	at com.liferay.portal.kernel.dao.db.BaseDBProcess.runSQL(BaseDBProcess.java:47)
      	at com.liferay.portal.kernel.upgrade.BaseCompanyIdUpgradeProcess$TableUpdater.doCall(BaseCompanyIdUpgradeProcess.java:122)
      	at com.liferay.portal.kernel.upgrade.BaseCompanyIdUpgradeProcess$TableUpdater.doCall(BaseCompanyIdUpgradeProcess.java:71)
      	at com.liferay.portal.kernel.upgrade.BaseUpgradeCallable.call(BaseUpgradeCallable.java:36)
      	at com.liferay.portal.upgrade.v7_4_x.UpgradeCompanyId.doUpgrade(UpgradeCompanyId.java:43)
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.lambda$upgrade$0(UpgradeProcess.java:114)
      	at com.liferay.portal.db.partition.DBPartitionUtil.forEachCompanyId(DBPartitionUtil.java:119)
      	at com.liferay.portal.dao.db.BaseDB.process(BaseDB.java:307)
      	at com.liferay.portal.kernel.dao.db.BaseDBProcess.process(BaseDBProcess.java:228)
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:101)
      	... 19 more
      

        Attachments

          Activity

            People

            Assignee:
            koor.gai Koor Gai
            Reporter:
            koor.gai Koor Gai
            Participants of an Issue:
            Recent user:
            Victor Ware
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              6 weeks, 1 day ago

                Packages

                Version Package
                7.4.1 CE GA2 DXP 7,4
                Master