Coder Social home page Coder Social logo

flyway-hsqldb-hang's Introduction

Flyway migration hang with HSQLDB

To reproduce the problem:

$ ./mvnw exec:java
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building flyway-hsqldb-hang 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- exec-maven-plugin:1.5.0:java (default-cli) @ flyway-hsqldb-hang ---
HSQLDB transaction manager: org.hsqldb.TransactionManager2PL@424adac4
Jul 15, 2016 9:39:53 AM org.flywaydb.core.internal.util.VersionPrinter printVersion
INFO: Flyway 3.2.1 by Boxfuse
Jul 15, 2016 9:39:53 AM org.flywaydb.core.internal.dbsupport.DbSupportFactory createDbSupport
INFO: Database: jdbc:hsqldb:mem:hang (HSQL Database Engine 2.3)
Jul 15, 2016 9:39:53 AM org.flywaydb.core.internal.command.DbValidate validate
INFO: Validated 1 migration (execution time 00:00.014s)
Jul 15, 2016 9:39:53 AM org.flywaydb.core.internal.metadatatable.MetaDataTableImpl createIfNotExists
INFO: Creating Metadata table: "PUBLIC"."schema_version"
Jul 15, 2016 9:39:53 AM org.flywaydb.core.internal.command.DbMigrate migrate
INFO: Current version of schema "PUBLIC": << Empty Schema >>
Jul 15, 2016 9:39:53 AM org.flywaydb.core.internal.command.DbMigrate applyMigration
INFO: Migrating schema "PUBLIC" to version 1 - init

It has been suggested that setting hsqldb.tx to mvcc will work around the problem. However, this does not appear to work:

$ ./mvnw exec:java -Dmvcc=true
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building flyway-hsqldb-hang 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- exec-maven-plugin:1.5.0:java (default-cli) @ flyway-hsqldb-hang ---
HSQLDB transaction manager: org.hsqldb.TransactionManagerMVCC@424adac4
Jul 15, 2016 9:40:35 AM org.flywaydb.core.internal.util.VersionPrinter printVersion
INFO: Flyway 3.2.1 by Boxfuse
Jul 15, 2016 9:40:35 AM org.flywaydb.core.internal.dbsupport.DbSupportFactory createDbSupport
INFO: Database: jdbc:hsqldb:mem:hang (HSQL Database Engine 2.3)
Jul 15, 2016 9:40:35 AM org.flywaydb.core.internal.command.DbValidate validate
INFO: Validated 1 migration (execution time 00:00.014s)
Jul 15, 2016 9:40:35 AM org.flywaydb.core.internal.metadatatable.MetaDataTableImpl createIfNotExists
INFO: Creating Metadata table: "PUBLIC"."schema_version"
Jul 15, 2016 9:40:35 AM org.flywaydb.core.internal.command.DbMigrate migrate
INFO: Current version of schema "PUBLIC": << Empty Schema >>
Jul 15, 2016 9:40:35 AM org.flywaydb.core.internal.command.DbMigrate applyMigration
INFO: Migrating schema "PUBLIC" to version 1 - init

The hang does not occur with HSQLDB 2.3.3:

$ ./mvnw exec:java -Dhsqldb.version=2.3.3
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building flyway-hsqldb-hang 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- exec-maven-plugin:1.5.0:java (default-cli) @ flyway-hsqldb-hang ---
HSQLDB transaction manager: org.hsqldb.TransactionManager2PL@3c38eff8
Jul 15, 2016 9:41:02 AM org.flywaydb.core.internal.util.VersionPrinter printVersion
INFO: Flyway 3.2.1 by Boxfuse
Jul 15, 2016 9:41:02 AM org.flywaydb.core.internal.dbsupport.DbSupportFactory createDbSupport
INFO: Database: jdbc:hsqldb:mem:hang (HSQL Database Engine 2.3)
Jul 15, 2016 9:41:02 AM org.flywaydb.core.internal.command.DbValidate validate
INFO: Validated 1 migration (execution time 00:00.014s)
Jul 15, 2016 9:41:02 AM org.flywaydb.core.internal.metadatatable.MetaDataTableImpl createIfNotExists
INFO: Creating Metadata table: "PUBLIC"."schema_version"
Jul 15, 2016 9:41:02 AM org.flywaydb.core.internal.command.DbMigrate migrate
INFO: Current version of schema "PUBLIC": << Empty Schema >>
Jul 15, 2016 9:41:02 AM org.flywaydb.core.internal.command.DbMigrate applyMigration
INFO: Migrating schema "PUBLIC" to version 1 - init
Jul 15, 2016 9:41:02 AM org.flywaydb.core.internal.command.DbMigrate logSummary
INFO: Successfully applied 1 migration to schema "PUBLIC" (execution time 00:00.029s).
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.755 s
[INFO] Finished at: 2016-07-15T09:41:02+01:00
[INFO] Final Memory: 11M/309M
[INFO] ------------------------------------------------------------------------

However, 2.3.3 does hang when configured to use MVCC:

$ ./mvnw exec:java -Dmvcc=true -Dhsqldb.version=2.3.3
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building flyway-hsqldb-hang 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- exec-maven-plugin:1.5.0:java (default-cli) @ flyway-hsqldb-hang ---
HSQLDB transaction manager: org.hsqldb.TransactionManagerMVCC@511bc697
Jul 15, 2016 9:42:05 AM org.flywaydb.core.internal.util.VersionPrinter printVersion
INFO: Flyway 3.2.1 by Boxfuse
Jul 15, 2016 9:42:05 AM org.flywaydb.core.internal.dbsupport.DbSupportFactory createDbSupport
INFO: Database: jdbc:hsqldb:mem:hang (HSQL Database Engine 2.3)
Jul 15, 2016 9:42:05 AM org.flywaydb.core.internal.command.DbValidate validate
INFO: Validated 1 migration (execution time 00:00.014s)
Jul 15, 2016 9:42:05 AM org.flywaydb.core.internal.metadatatable.MetaDataTableImpl createIfNotExists
INFO: Creating Metadata table: "PUBLIC"."schema_version"
Jul 15, 2016 9:42:05 AM org.flywaydb.core.internal.command.DbMigrate migrate
INFO: Current version of schema "PUBLIC": << Empty Schema >>
Jul 15, 2016 9:42:05 AM org.flywaydb.core.internal.command.DbMigrate applyMigration
INFO: Migrating schema "PUBLIC" to version 1 - init

flyway-hsqldb-hang's People

Contributors

wilkinsona avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

luiz158

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.