Backport to 3.2 the fix that prevents the database to end up in an inconsistent state

Description

In version 3.0 of OS, the database will end up in an inconsistent state if an exception is thrown in HibernateObserver.persistStatesWithSchema

To replicate:

  • throw exception in HibernateObserver.persistStatesWithSchema

  • deploy traderdemo

  • runBank

  • check the database in Bank of Corda. There should be a transaction entry in the node_transactions and vault_states, but no entry in the Cash or Commercial Paper tables.

On master, same steps, and all tables will be empty ( so the transaction rolled back), which is the correct behaviour.

It is not clear what change actually fixed the issue.

Will fix: https://stackoverflow.com/questions/50931075/initiator-unable-to-commit-states-to-vault-linear-states-after-notary-signed

Activity

Show:
Andrey Brozhko
July 17, 2018, 8:50 AM

According to this has been done (backported) already

Assignee

Tudor Malene

Reporter

Tudor Malene

Labels

None

Sprint

None

Epic Link

None

Priority

Medium

Severity

Medium

CVSS Score

None

CVSS Vector

None

Due Date

None

Engineering Teams

None

Fix versions

Affects versions

None

Ported to...

None

Story Points / Dev Days

None
Configure