| Issue 3669: | Fail to upgrade from 2.9.1 due to schema upgrade error. | |
| 5 people starred this issue and may be notified of changes. | Back to list |
***************************************************************** ***** ***** ***** !!!! THIS BUG TRACKER IS FOR GERRIT CODE REVIEW !!!! ***** ***** ***** ***** DO NOT SUBMIT BUGS FOR CHROME, ANDROID, CYANOGENMOD, ***** ***** INTERNAL ISSUES WITH YOUR COMPANY'S GERRIT SETUP, ETC.***** ***** ***** ***** THOSE ISSUES BELONG IN DIFFERENT ISSUE TRACKERS ***** ***** ***** ***************************************************************** Affected Version:2.9.1, 2.12 What steps will reproduce the problem? 1.Use v2.9.1 gerrit.war to init a gerrit site 2.Stop gerrit service. Copy v2.12 gerrit.war into $site/bin/ 3.Run gerrit.war to start the schema upgrade. What is the expected output? What do you see instead? Success schema upgrade is expected. But what we see is a JDBC exception: org.h2.jdbc.JdbcSQLException: Column "HIDE_EMPTY_PANE" not found; SQL statement Please provide any additional information below. I used gsql console to add two column: hide_empty_pane boolean,auto_hide_diff_table_header boolean then upgrade can continue with success.
Nov 12, 2015
#1
coll...@gmail.com
Nov 25, 2015
That's strange. One of columns you are mentioning was introduced in 2.10: [1]. When upgrading from 2.9 to 2.12, the schema should be upgraded to 2.10 first, the column(s) should be added, and in Schema_115 the table account_diff_preferences should contain the hide_empty_pane column. * [1] https://gerrit-review.googlesource.com/56713
Status:
AwaitingInformation
Dec 5, 2015
I was just able to reproduce this issue also while updating a test-setup from 2.9 to 2.12-rc2.
Step 97 got executed:
...
Upgrading schema to 96 ...
Upgrading schema to 97 ...
Upgrading schema to 98 ...
...
Migrating data to schema 96 ...
Migrating data to schema 97 ...
Migrating data to schema 98 ...
...
Migrating data to schema 115 ...
Exception in thread "main" com.google.gwtorm.server.OrmException: Cannot upgrade schema
at com.google.gerrit.server.schema.SchemaUpdater.update(SchemaUpdater.java:109)
at com.google.gerrit.pgm.init.BaseInit$SiteRun.upgradeSchema(BaseInit.java:341)
at com.google.gerrit.pgm.init.BaseInit.run(BaseInit.java:127)
at com.google.gerrit.pgm.util.AbstractProgram.main(AbstractProgram.java:64)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.google.gerrit.launcher.GerritLauncher.invokeProgram(GerritLauncher.java:159)
at com.google.gerrit.launcher.GerritLauncher.mainImpl(GerritLauncher.java:100)
at com.google.gerrit.launcher.GerritLauncher.main(GerritLauncher.java:56)
at Main.main(Main.java:25)
Caused by: org.h2.jdbc.JdbcSQLException: Column "HIDE_EMPTY_PANE" not found; SQL statement:
SELECT id, context, expand_all_comments, hide_line_numbers, hide_top_menu, ignore_whitespace, intraline_difference, line_length, manual_review, render_entire_file, retain_header, show_line_endings, show_tabs, show_whitespace_errors, skip_deleted, skip_uncommented, syntax_highlighting, tab_size, theme, hide_empty_pane, auto_hide_diff_table_header FROM account_diff_preferences [42122-176]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:344)
at org.h2.message.DbException.get(DbException.java:178)
at org.h2.message.DbException.get(DbException.java:154)
at org.h2.expression.ExpressionColumn.optimize(ExpressionColumn.java:148)
at org.h2.command.dml.Select.prepare(Select.java:831)
at org.h2.command.Parser.prepareCommand(Parser.java:248)
at org.h2.engine.Session.prepareLocal(Session.java:442)
at org.h2.engine.Session.prepareCommand(Session.java:384)
at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1188)
at org.h2.jdbc.JdbcStatement.executeQuery(JdbcStatement.java:75)
at com.google.gerrit.server.schema.Schema_115.migrateData(Schema_115.java:74)
at com.google.gerrit.server.schema.SchemaVersion.migrateData(SchemaVersion.java:141)
at com.google.gerrit.server.schema.SchemaVersion.upgradeFrom(SchemaVersion.java:80)
at com.google.gerrit.server.schema.SchemaVersion.check(SchemaVersion.java:71)
at com.google.gerrit.server.schema.SchemaUpdater.update(SchemaUpdater.java:107)
... 11 more
Dec 28, 2015
I have also got this error on another Gerrit setup (using PostgreSQL) while updating to 2.12 final.
Migrating data to schema 115 ...
Exception in thread "main" com.google.gwtorm.server.OrmException: Cannot upgrade schema
at com.google.gerrit.server.schema.SchemaUpdater.update(SchemaUpdater.java:109)
at com.google.gerrit.pgm.init.BaseInit$SiteRun.upgradeSchema(BaseInit.java:341)
at com.google.gerrit.pgm.init.BaseInit.run(BaseInit.java:127)
at com.google.gerrit.pgm.util.AbstractProgram.main(AbstractProgram.java:64)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.google.gerrit.launcher.GerritLauncher.invokeProgram(GerritLauncher.java:159)
at com.google.gerrit.launcher.GerritLauncher.mainImpl(GerritLauncher.java:100)
at com.google.gerrit.launcher.GerritLauncher.main(GerritLauncher.java:56)
at Main.main(Main.java:25)
Caused by: org.postgresql.util.PSQLException: ERROR: column "auto_hide_diff_table_header" does not exist
Position: 321
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2103)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1836)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:512)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:374)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:254)
at com.google.gerrit.server.schema.Schema_115.migrateData(Schema_115.java:74)
at com.google.gerrit.server.schema.SchemaVersion.migrateData(SchemaVersion.java:141)
at com.google.gerrit.server.schema.SchemaVersion.upgradeFrom(SchemaVersion.java:80)
at com.google.gerrit.server.schema.SchemaVersion.check(SchemaVersion.java:71)
at com.google.gerrit.server.schema.SchemaUpdater.update(SchemaUpdater.java:107)
... 11 more
Jan 2, 2016
Fix available: https://gerrit-review.googlesource.com/73593
Jan 3, 2016
I had also got this error from 2.10rc to 2.12 (offline upgrade) I workaround this by step by step from 2.10rc --> 2.11 --> 2.12
Jan 3, 2016
(No comment was entered for this change.)
Status:
Submitted
Labels: FixedIn-2.12.1
Jan 3, 2016
Issue 3740 has been merged into this issue.
Jan 6 (4 days ago)
Issue 3748 has been merged into this issue. |
|
| ► Sign in to add a comment |