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

Unable to upgrade sharded databases from 6.2 to 7.0 one at a time

    Details

    • Fix Priority:
      5

      Description

      Steps to reproduce:

      1. Set up 3 physical partitions (3 shards)
      2. Upgrade the default shard from 6.2 to 7.0

      Result: Upgrade fails with the following exception.

      21:47:29,284 INFO  [main][LoggingTimer:70] Starting com.liferay.portal.upgrade.v7_0_0.UpgradeSharding#copyControlTables
      21:47:29,328 WARN  [main][UpgradeSharding:90] Control table Company should not contain data in a nondefault shard
      21:47:29,338 INFO  [main][Table:166] Starting backup of Company to /var/folders/dv/jjdgk4dd3jd88c_wkwjmgmw40000gn/T/temp-db-Company-1896544649312897803.tmp
      21:47:29,340 ERROR [main][UpgradeSharding:186] Unable to copy control tables
      com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table '70x.company' doesn't exist
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
      	at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
      	at com.mysql.jdbc.Util.getInstance(Util.java:386)
      	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1053)
      	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4120)
      	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4052)
      	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2503)
      	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2664)
      	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2794)
      	at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2155)
      	at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2322)
      	at com.liferay.portal.upgrade.util.Table.generateTempFile(Table.java:176)
      	at com.liferay.portal.upgrade.util.BaseUpgradeTableImpl.updateTable(BaseUpgradeTableImpl.java:94)
      	at com.liferay.portal.upgrade.util.DefaultUpgradeTableImpl.copyTable(DefaultUpgradeTableImpl.java:43)
      	at com.liferay.portal.upgrade.v7_0_0.UpgradeSharding.copyControlTable(UpgradeSharding.java:111)
      	at com.liferay.portal.upgrade.v7_0_0.UpgradeSharding.copyCompanyTable(UpgradeSharding.java:62)
      	at com.liferay.portal.upgrade.v7_0_0.UpgradeSharding.copyControlTables(UpgradeSharding.java:148)
      	at com.liferay.portal.upgrade.v7_0_0.UpgradeSharding.copyControlTables(UpgradeSharding.java:133)
      	at com.liferay.portal.upgrade.v7_0_0.UpgradeSharding.doUpgrade(UpgradeSharding.java:198)
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:88)
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:115)
      	at com.liferay.portal.upgrade.UpgradeProcess_7_0_0.doUpgrade(UpgradeProcess_7_0_0.java:104)
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:88)
      	at com.liferay.portal.kernel.upgrade.util.UpgradeProcessUtil._upgradeProcess(UpgradeProcessUtil.java:175)
      	at com.liferay.portal.kernel.upgrade.util.UpgradeProcessUtil.upgradeProcess(UpgradeProcessUtil.java:143)
      	at com.liferay.portal.kernel.upgrade.util.UpgradeProcessUtil.upgradeProcess(UpgradeProcessUtil.java:125)
      	at com.liferay.portal.events.StartupHelper.upgradeProcess(StartupHelper.java:164)
      	at com.liferay.portal.events.StartupHelperUtil.upgradeProcess(StartupHelperUtil.java:81)
      	at com.liferay.portal.tools.DBUpgrader.upgrade(DBUpgrader.java:158)
      	at com.liferay.portal.tools.DBUpgrader.main(DBUpgrader.java:96)
      21:47:29,386 ERROR [main][BaseDBProcess:174] com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table '70x.company' doesn't exist
      com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table '70x.company' doesn't exist
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
      	at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
      	at com.mysql.jdbc.Util.getInstance(Util.java:386)
      	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1053)
      	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4120)
      	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4052)
      	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2503)
      	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2664)
      	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2794)
      	at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2155)
      	at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2322)
      	at com.liferay.portal.kernel.dao.db.BaseDBProcess.hasRows(BaseDBProcess.java:163)
      	at com.liferay.portal.upgrade.v7_0_0.UpgradeSharding.copyControlTable(UpgradeSharding.java:88)
      	at com.liferay.portal.upgrade.v7_0_0.UpgradeSharding.copyCompanyTable(UpgradeSharding.java:62)
      	at com.liferay.portal.upgrade.v7_0_0.UpgradeSharding.copyControlTables(UpgradeSharding.java:148)
      	at com.liferay.portal.upgrade.v7_0_0.UpgradeSharding.copyControlTables(UpgradeSharding.java:133)
      	at com.liferay.portal.upgrade.v7_0_0.UpgradeSharding.doUpgrade(UpgradeSharding.java:198)
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:88)
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:115)
      	at com.liferay.portal.upgrade.UpgradeProcess_7_0_0.doUpgrade(UpgradeProcess_7_0_0.java:104)
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:88)
      	at com.liferay.portal.kernel.upgrade.util.UpgradeProcessUtil._upgradeProcess(UpgradeProcessUtil.java:175)
      	at com.liferay.portal.kernel.upgrade.util.UpgradeProcessUtil.upgradeProcess(UpgradeProcessUtil.java:143)
      	at com.liferay.portal.kernel.upgrade.util.UpgradeProcessUtil.upgradeProcess(UpgradeProcessUtil.java:125)
      	at com.liferay.portal.events.StartupHelper.upgradeProcess(StartupHelper.java:164)
      	at com.liferay.portal.events.StartupHelperUtil.upgradeProcess(StartupHelperUtil.java:81)
      	at com.liferay.portal.tools.DBUpgrader.upgrade(DBUpgrader.java:158)
      	at com.liferay.portal.tools.DBUpgrader.main(DBUpgrader.java:96)
      21:47:29,387 INFO  [main][UpgradeSharding:100] Unable to drop control table Company because it  does not exist in the target shard
      21:47:29,388 INFO  [main][Table:166] Starting backup of Company to /var/folders/dv/jjdgk4dd3jd88c_wkwjmgmw40000gn/T/temp-db-Company-6792419364188104600.tmp
      21:47:29,388 ERROR [main][UpgradeSharding:186] Unable to copy control tables
      com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table '70x.company' doesn't exist
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
      	at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
      	at com.mysql.jdbc.Util.getInstance(Util.java:386)
      	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1053)
      	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4120)
      	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4052)
      	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2503)
      	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2664)
      	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2794)
      	at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2155)
      	at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2322)
      	at com.liferay.portal.upgrade.util.Table.generateTempFile(Table.java:176)
      	at com.liferay.portal.upgrade.util.BaseUpgradeTableImpl.updateTable(BaseUpgradeTableImpl.java:94)
      	at com.liferay.portal.upgrade.util.DefaultUpgradeTableImpl.copyTable(DefaultUpgradeTableImpl.java:43)
      	at com.liferay.portal.upgrade.v7_0_0.UpgradeSharding.copyControlTable(UpgradeSharding.java:111)
      	at com.liferay.portal.upgrade.v7_0_0.UpgradeSharding.copyCompanyTable(UpgradeSharding.java:62)
      	at com.liferay.portal.upgrade.v7_0_0.UpgradeSharding.copyControlTables(UpgradeSharding.java:148)
      	at com.liferay.portal.upgrade.v7_0_0.UpgradeSharding.copyControlTables(UpgradeSharding.java:133)
      	at com.liferay.portal.upgrade.v7_0_0.UpgradeSharding.doUpgrade(UpgradeSharding.java:198)
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:88)
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:115)
      	at com.liferay.portal.upgrade.UpgradeProcess_7_0_0.doUpgrade(UpgradeProcess_7_0_0.java:104)
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:88)
      	at com.liferay.portal.kernel.upgrade.util.UpgradeProcessUtil._upgradeProcess(UpgradeProcessUtil.java:175)
      	at com.liferay.portal.kernel.upgrade.util.UpgradeProcessUtil.upgradeProcess(UpgradeProcessUtil.java:143)
      	at com.liferay.portal.kernel.upgrade.util.UpgradeProcessUtil.upgradeProcess(UpgradeProcessUtil.java:125)
      	at com.liferay.portal.events.StartupHelper.upgradeProcess(StartupHelper.java:164)
      	at com.liferay.portal.events.StartupHelperUtil.upgradeProcess(StartupHelperUtil.java:81)
      	at com.liferay.portal.tools.DBUpgrader.upgrade(DBUpgrader.java:158)
      	at com.liferay.portal.tools.DBUpgrader.main(DBUpgrader.java:96)
      21:47:29,389 INFO  [main][LoggingTimer:38] Completed com.liferay.portal.upgrade.v7_0_0.UpgradeSharding#copyControlTables in 105 ms
      21:47:29,389 INFO  [main][UpgradeProcess:97] Completed upgrade process com.liferay.portal.upgrade.v7_0_0.UpgradeSharding in 106ms
      21:47:29,389 INFO  [main][UpgradeProcess:97] Completed upgrade process com.liferay.portal.upgrade.UpgradeProcess_7_0_0 in 9538ms
      21:47:29,389 INFO  [main][UpgradeProcess:82] Upgrading com.liferay.portal.upgrade.UpgradeProcess_7_0_1
      21:47:29,390 INFO  [main][UpgradeProcess:82] Upgrading com.liferay.portal.upgrade.v7_0_1.UpgradeSchema
      21:47:29,390 INFO  [main][LoggingTimer:70] Starting com.liferay.portal.kernel.dao.db.BaseDBProcess#runSQLTemplate#update-7.0.0-7.0.1.sql
      21:47:29,412 INFO  [main][LoggingTimer:38] Completed com.liferay.portal.kernel.dao.db.BaseDBProcess#runSQLTemplate#update-7.0.0-7.0.1.sql in 22 ms
      21:47:29,412 INFO  [main][UpgradeProcess:97] Completed upgrade process com.liferay.portal.upgrade.v7_0_1.UpgradeSchema in 22ms
      21:47:29,413 INFO  [main][UpgradeProcess:82] Upgrading com.liferay.portal.upgrade.v7_0_1.UpgradeCompany
      21:47:29,413 INFO  [main][LoggingTimer:70] Starting com.liferay.portal.upgrade.v7_0_1.UpgradeCompany#updateCompanyKey
      21:47:29,414 INFO  [main][LoggingTimer:38] Completed com.liferay.portal.upgrade.v7_0_1.UpgradeCompany#updateCompanyKey in 1 ms
      21:47:29,414 INFO  [main][UpgradeProcess:97] Completed upgrade process com.liferay.portal.upgrade.v7_0_1.UpgradeCompany in 1ms
      21:47:29,414 INFO  [main][UpgradeProcess:97] Completed upgrade process com.liferay.portal.upgrade.UpgradeProcess_7_0_1 in 25ms
      com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table '70x.company' doesn't exist
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:91)
      	at com.liferay.portal.kernel.upgrade.util.UpgradeProcessUtil._upgradeProcess(UpgradeProcessUtil.java:175)
      	at com.liferay.portal.kernel.upgrade.util.UpgradeProcessUtil.upgradeProcess(UpgradeProcessUtil.java:143)
      	at com.liferay.portal.kernel.upgrade.util.UpgradeProcessUtil.upgradeProcess(UpgradeProcessUtil.java:125)
      	at com.liferay.portal.events.StartupHelper.upgradeProcess(StartupHelper.java:164)
      	at com.liferay.portal.events.StartupHelperUtil.upgradeProcess(StartupHelperUtil.java:81)
      	at com.liferay.portal.tools.DBUpgrader.upgrade(DBUpgrader.java:158)
      	at com.liferay.portal.tools.DBUpgrader.main(DBUpgrader.java:96)
      Caused by: com.liferay.portal.kernel.upgrade.UpgradeException: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table '70x.company' doesn't exist
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:91)
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:115)
      	at com.liferay.portal.upgrade.UpgradeProcess_7_0_1.doUpgrade(UpgradeProcess_7_0_1.java:39)
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:88)
      	... 7 more
      Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table '70x.company' doesn't exist
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
      	at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
      	at com.mysql.jdbc.Util.getInstance(Util.java:386)
      	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1053)
      	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4120)
      	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4052)
      	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2503)
      	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2664)
      	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2794)
      	at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2155)
      	at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2322)
      	at com.liferay.portal.upgrade.v7_0_1.UpgradeCompany.updateCompanyKey(UpgradeCompany.java:41)
      	at com.liferay.portal.upgrade.v7_0_1.UpgradeCompany.doUpgrade(UpgradeCompany.java:34)
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:88)
      	... 10 more
      

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                4 years, 11 weeks, 1 day ago

                Packages

                Version Package