When running the quick start tutorial, if you try to persist the data into a Postgres database, you get a ledger identifier mismatch in the console when you restart the sandbox.
After checking the database the information for the contracts is still there, but ledger_entries
is empty.
Steps:
daml new quickstart quickstart-java
cd quickstart
daml build
daml sandbox dist/quickstart.dar --sql-backend-jdbcurl jdbc:postgresql://localhost/postgres?user=user&password=pass
The following is the output on the console:
HikariPool-1 - Start completed.
HikariPool-2 - Starting...
HikariPool-2 - Start completed.
running Flyway migration..
Flyway Community Edition 5.2.4 by Boxfuse
Database: jdbc:postgresql://localhost/postgres (PostgreSQL 11.3)
Flyway upgrade recommended: PostgreSQL 11.3 is newer than this version of Flyway and support has not been tested.
Successfully validated 4 migrations (execution time 00:00.053s)
Current version of schema "public": 3
Schema "public" is up to date. No migration necessary.
Flyway schema migration finished successfully applying 0 steps.
Ledger id mismatch. Ledger id given ('sandbox-69cc5004-a456-4372-9979-74e3e0eb94d2') is not equal to the existing one ('sandbox-3896b4a5-3b50-4d75-b062-7370898eac2d')!
Could not start PostgreSQL persistence layer
java.lang.RuntimeException: Ledger id mismatch. Ledger id given ('sandbox-69cc5004-a456-4372-9979-74e3e0eb94d2') is not equal to the existing one ('sandbox-3896b4a5-3b50-4d75-b062-7370898eac2d')!
Is this a not controlled error? Or is the data saved in the database inconsistent?