Consensys / tessera

Tessera - Enterprise Implementation of Quorum's transaction manager
https://docs.tessera.consensys.net/
Apache License 2.0
180 stars 109 forks source link

JDBC exceptions with 21.7.2 #1404

Closed damesca closed 2 years ago

damesca commented 2 years ago

When I run some nodes, the first lines which are written to /Tessera/target/h2/tessera2.trace.db are:

2022-03-11 13:52:54 jdbc[3]: exception
org.h2.jdbc.JdbcSQLSyntaxErrorException: Table "ENCRYPTED_TRANSACTION" not found; SQL statement:
SELECT 1 FROM ENCRYPTED_TRANSACTION [42102-200]
2022-03-11 13:52:54 jdbc[3]: exception
org.h2.jdbc.JdbcSQLSyntaxErrorException: Table "ENCRYPTED_RAW_TRANSACTION" not found; SQL statement:
SELECT 1 FROM ENCRYPTED_RAW_TRANSACTION [42102-200]
2022-03-11 13:52:54 jdbc[3]: exception
org.h2.jdbc.JdbcSQLSyntaxErrorException: Table "PRIVACY_GROUP" not found; SQL statement:
SELECT 1 FROM PRIVACY_GROUP [42102-200]
2022-03-11 13:52:54 jdbc[3]: exception
org.h2.jdbc.JdbcSQLSyntaxErrorException: Table "ST_AFFECTED_TRANSACTION" not found; SQL statement:
ALTER TABLE ST_AFFECTED_TRANSACTION DROP CONSTRAINT FK_ST_AFFECTED_TRANSACTION_TXN_ID [42102-200]
2022-03-11 13:52:54 jdbc[3]: exception
org.h2.jdbc.JdbcSQLSyntaxErrorException: Index "ST_TRANSACTION_VALSTG" not found; SQL statement:
DROP INDEX ST_TRANSACTION_VALSTG [42112-200]
    at com.h2database@1.4.200/org.h2.message.DbException.getJdbcSQLException(DbException.java:453)
    at com.h2database@1.4.200/org.h2.message.DbException.getJdbcSQLException(DbException.java:429)
    at com.h2database@1.4.200/org.h2.message.DbException.get(DbException.java:205)
    at com.h2database@1.4.200/org.h2.message.DbException.get(DbException.java:181)
    at com.h2database@1.4.200/org.h2.command.ddl.DropIndex.update(DropIndex.java:49)
    at com.h2database@1.4.200/org.h2.command.CommandContainer.update(CommandContainer.java:198)
    at com.h2database@1.4.200/org.h2.command.Command.executeUpdate(Command.java:251)
    at com.h2database@1.4.200/org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:191)
    at com.h2database@1.4.200/org.h2.jdbc.JdbcPreparedStatement.executeUpdate(JdbcPreparedStatement.java:152)
    at com.zaxxer.hikari@3.2.0/com.zaxxer.hikari.pool.ProxyPreparedStatement.executeUpdate(ProxyPreparedStatement.java:61)
    at com.zaxxer.hikari@3.2.0/com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeUpdate(HikariProxyPreparedStatement.java)
    at org.eclipse.persistence.core@2.7.7/org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:898)
    at org.eclipse.persistence.core@2.7.7/org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeNoSelect(DatabaseAccessor.java:970)
    at org.eclipse.persistence.core@2.7.7/org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:640)
    at org.eclipse.persistence.core@2.7.7/org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:567)
    at org.eclipse.persistence.core@2.7.7/org.eclipse.persistence.internal.sessions.AbstractSession.basicExecuteCall(AbstractSession.java:2099)
    at org.eclipse.persistence.core@2.7.7/org.eclipse.persistence.sessions.server.ServerSession.executeCall(ServerSession.java:603)
    at org.eclipse.persistence.core@2.7.7/org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:277)
    at org.eclipse.persistence.core@2.7.7/org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:263)
    at org.eclipse.persistence.core@2.7.7/org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeNoSelectCall(DatasourceCallQueryMechanism.java:306)
    at org.eclipse.persistence.core@2.7.7/org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeNoSelect(DatasourceCallQueryMechanism.java:286)
    at org.eclipse.persistence.core@2.7.7/org.eclipse.persistence.queries.DataModifyQuery.executeDatabaseQuery(DataModifyQuery.java:87)
    at org.eclipse.persistence.core@2.7.7/org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:911)
...

I cannot figure why those tables are not being correctly created.

macfarla commented 2 years ago

Hi @damesca this is normal behaviour. These log messages could be made less alarming but this should not affect operation of your Tessera node. Does it start up and work as expected?

damesca commented 2 years ago

Yes, it works perfectly. I just was playing with some modifications to the database and I by those log messages I thought that tables were not being correctly generated.