google-nomulus/core/src
Weimin Yu 7135219151 Fix sporadic SQL Snapshot failure (#1571)
* Fix sporadic SQL Snapshot failure

The Postgresql set-snapshot statement (called in
JpaTransactionManager.setDatabaseSnapshot() method) must be the first
statement in the SQL transaction.

Currenty the JpaTransaction.transact() method may insert a query for
DatabaseMigrationStateSchedule before the user query when the cache is
empty or the cached value expires.

This PR proactively preloads the cache in RegistryJpaIO to prevent cache
loading  inside the transaction.

This PR also changes some DatabaseSnapshotTest tests to be retrying, in
case they run just after the cache expires. (This has happened before in
CI).
2022-03-25 15:55:00 -04:00
..
main Fix sporadic SQL Snapshot failure (#1571) 2022-03-25 15:55:00 -04:00
nonprod Fix some low-hanging code quality issue fruits (#1047) 2021-04-01 18:04:21 -04:00
test Fix sporadic SQL Snapshot failure (#1571) 2022-03-25 15:55:00 -04:00