Move the flush into the existing transaction
This commit is contained in:
parent
16039af110
commit
be23eb3cfc
|
@ -713,6 +713,7 @@ public class TermCodeSystemStorageSvcImpl implements ITermCodeSystemStorageSvc {
|
||||||
|
|
||||||
txTemplate.execute(t -> {
|
txTemplate.execute(t -> {
|
||||||
link.forEach(id -> theDao.deleteByPid(id));
|
link.forEach(id -> theDao.deleteByPid(id));
|
||||||
|
theDao.flush();
|
||||||
return null;
|
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));
|
ourLog.info(" * {} {} deleted ({}/{}) remaining - {}/sec - ETA: {}", count, theDescriptor, count, totalCount, sw.formatThroughput(count, TimeUnit.SECONDS), sw.getEstimatedTimeRemaining(count, totalCount));
|
||||||
|
|
||||||
}
|
}
|
||||||
txTemplate.executeWithoutResult(t -> {
|
|
||||||
theDao.flush();
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue