Upgrade from 2.9.1 to 2.14.1

617 views
Skip to first unread message

李大明

unread,
Jun 13, 2017, 10:53:49 PM6/13/17
to Repo and Gerrit Discussion
I try to upgrade our Gerrit server from 2.9 to 2.14.1. 

When I run 

java -jar gerrit-2.14.1.war init -d <site_path>

I got the following error:

   Upgrading schema to 142 ...
Migrating data to schema 98 ...
Migrate user preference showUserInReview to reviewCategoryStrategy
Exception in thread "main" com.google.gwtorm.server.OrmException: Cannot upgrade schema
at com.google.gerrit.server.schema.SchemaUpdater.update(SchemaUpdater.java:117)
at com.google.gerrit.pgm.init.BaseInit$SiteRun.upgradeSchema(BaseInit.java:386)
at com.google.gerrit.pgm.init.BaseInit.run(BaseInit.java:143)
at com.google.gerrit.pgm.util.AbstractProgram.main(AbstractProgram.java:61)
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:497)
at com.google.gerrit.launcher.GerritLauncher.invokeProgram(GerritLauncher.java:204)
at com.google.gerrit.launcher.GerritLauncher.mainImpl(GerritLauncher.java:108)
at com.google.gerrit.launcher.GerritLauncher.main(GerritLauncher.java:63)
at Main.main(Main.java:24)
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'REVIEW_CATEGORY_STRATEGY' in 'field list'
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:422)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
at com.mysql.jdbc.Util.getInstance(Util.java:408)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:943)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3973)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3909)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2527)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2680)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2497)
at com.mysql.jdbc.StatementImpl.executeUpdateInternal(StatementImpl.java:1540)
at com.mysql.jdbc.StatementImpl.executeLargeUpdate(StatementImpl.java:2595)
at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1468)
at com.google.gerrit.server.schema.Schema_98.migrateData(Schema_98.java:33)
at com.google.gerrit.server.schema.SchemaVersion.migrateData(SchemaVersion.java:153)
at com.google.gerrit.server.schema.SchemaVersion.upgradeFrom(SchemaVersion.java:92)
at com.google.gerrit.server.schema.SchemaVersion.check(SchemaVersion.java:83)
at com.google.gerrit.server.schema.SchemaUpdater.update(SchemaUpdater.java:115)

Does that mean if I can not upgrade from 2.9 to 2.14.1 ?  Shall I need to upgrade to maybe 2.11 than upgrade to 2.14?

Edwin Kempin

unread,
Jun 14, 2017, 2:26:56 AM6/14/17
to 李大明, Repo and Gerrit Discussion
Yes, please try this.
 

--
--
To unsubscribe, email repo-discuss+unsubscribe@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Saša Živkov

unread,
Jun 14, 2017, 4:15:55 AM6/14/17
to 李大明, Repo and Gerrit Discussion
On Wed, Jun 14, 2017 at 4:53 AM, 李大明 <dcg...@gmail.com> wrote:
If you want to use online reindexing then you will have to upgrade in several steps: 2.10, 2.11, 2.12, 2.13, 2.14.
See the release notes of Gerrit 2.13:

李大明

unread,
Jun 16, 2017, 11:37:38 PM6/16/17
to Repo and Gerrit Discussion, dcg...@gmail.com

Hi, zivkov, Edwin,

   We notice if upgrade from 2.9 to 2.11, there will be Lucene index issue.
   We  will try upgrade version by version. Thanks for the suggestions.

zivkov於 2017年6月14日星期三 UTC+8下午4時15分55秒寫道:



--
--
To unsubscribe, email repo-discuss...@googlegroups.com

More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.

jiga...@gmail.com

unread,
Feb 16, 2018, 2:18:52 AM2/16/18
to Repo and Gerrit Discussion
Were you able to upgrade successfully?
Reply all
Reply to author
Forward
0 new messages