Remove recursive load in DBMSS cache (#1286)

* Remove recursive load in DBMSS cache

This occurs because if we do a standard transaction, the JpaTxnManager
checks to see if we should be doing backups, which involves loading the
migration state schedule (causing the recursion). When starting the
transaction to load the schedule, we should explicitly
transactWithoutBackup so there's no need to check.

This wasn't hit in tests because we previously manually set the
replication to not occur in the JpaTransactionManagerExtension -- we
remove that and related setters.
This commit is contained in:
gbrodman
2021-08-14 12:34:23 -06:00
committed by GitHub
parent 22b1b8d21a
commit 7a4c109b36
5 changed files with 3 additions and 6 deletions
@@ -222,7 +222,7 @@ public class DatabaseMigrationStateSchedule extends CrossTldSingleton implements
@VisibleForTesting
static TimedTransitionProperty<MigrationState, MigrationStateTransition> getUncached() {
return jpaTm()
.transactNew(
.transactWithoutBackup(
() -> {
try {
return jpaTm()