在运行快速入门教程时,如果您尝试将数据持久化到 Postgres 数据库中,那么当您重新启动沙箱时,您会在控制台中看到账本标识符不匹配。
检查数据库后,合同信息仍然存在,但ledger_entries
为空。
脚步:
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
以下是控制台上的输出:
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')!
这是一个不受控制的错误吗?还是数据库中保存的数据不一致?