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

Unable to complete an upgrade to 6.1 using sharding because it tries to upgrade the default shard twice

    Details

      Description

      Steps to reproduce it:
      1- Startup Liferay portal 6.0 SP1 (probably it happens with every version prior to 6.1 but in different upgrade method) using sharding
      2- Create at least 3 virtual host
      3- Create one image folder and one image in one of the virtual host associated to one shard different than default one.
      4- Upgrade to 6.1GA2

      The following exception is thrown:
      00:51:48,229 ERROR [pool-2-thread-1][MainServlet:217] com.liferay.portal.kernel.events.ActionException: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'lportalsharddefault.igfolder' doesn't exist
      com.liferay.portal.kernel.events.ActionException: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'lportalsharddefault.igfolder' doesn't exist
      at com.liferay.portal.events.StartupAction.run(StartupAction.java:58)
      ...
      ...
      Caused by: com.liferay.portal.kernel.upgrade.UpgradeException: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'lportalsharddefault.igfolder' doesn't exist
      at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:213)
      at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:227)
      at com.liferay.portal.upgrade.UpgradeProcess_6_0_12.doUpgrade(UpgradeProcess_6_0_12.java:59)
      at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:210)
      ... 39 more
      Caused by: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'lportalsharddefault.igfolder' doesn't exist
      at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
      at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2985)
      at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1631)
      at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)
      at com.mysql.jdbc.Connection.execSQL(Connection.java:3256)
      at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1313)
      at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1448)
      at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:76)
      at com.liferay.portal.upgrade.v6_0_12.UpgradeUserName.updateTable(UpgradeUserName.java:62)
      at com.liferay.portal.upgrade.v6_0_12.UpgradeUserName.doUpgrade(UpgradeUserName.java:37)
      at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:210)
      ... 42 more
      01:19:06,053 INFO [pool-2-thread-1][ShardDataSourceTargetSource:82] Sharding configured with 3 data sources

      NOTE: This LPS also solves another problem related to sharding:
      Unknown column 'userimpl0_.ldapServerId' in 'field list'

      This occurs because we execute the method RoleLocalServiceUtil.checkSystemRoles() for all the shards in every company but we have to excute every company in the proper shard.
      Commit 3ef048dc174305b5b37d19a7366ff446f851e726

        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:
                  4 years, 28 weeks, 5 days ago

                  Packages

                  Version Package
                  6.0.X EE
                  6.1.30 EE GA3
                  6.2.0 CE M4