Move the flush into the existing transaction

This commit is contained in:
jamesagnew 2020-06-27 18:06:37 -04:00
parent 16039af110
commit be23eb3cfc
1 changed files with 1 additions and 3 deletions

View File

@ -713,6 +713,7 @@ public class TermCodeSystemStorageSvcImpl implements ITermCodeSystemStorageSvc {
txTemplate.execute(t -> {
link.forEach(id -> theDao.deleteByPid(id));
theDao.flush();
return null;
});
@ -720,9 +721,6 @@ public class TermCodeSystemStorageSvcImpl implements ITermCodeSystemStorageSvc {
ourLog.info(" * {} {} deleted ({}/{}) remaining - {}/sec - ETA: {}", count, theDescriptor, count, totalCount, sw.formatThroughput(count, TimeUnit.SECONDS), sw.getEstimatedTimeRemaining(count, totalCount));
}
txTemplate.executeWithoutResult(t -> {
theDao.flush();
});
}