DBZ-7047 Only iterate active transactions when DEBUG enabled

This commit is contained in:
Chris Cranford 2023-10-24 22:47:07 -04:00 committed by Chris Cranford
parent 16d70a1642
commit de0969899f

View File

@ -237,7 +237,7 @@ public Scn process(Scn startScn, Scn endScn) throws SQLException, InterruptedExc
offsetContext.getCommitScn(), metrics.getNumberOfActiveTransactions(),
metrics.getSleepTimeInMilliseconds());
if (metrics.getNumberOfActiveTransactions() > 0) {
if (metrics.getNumberOfActiveTransactions() > 0 && LOGGER.isDebugEnabled()) {
// This is wrapped in try-with-resources specifically for Infinispan performance
try (Stream<T> stream = getTransactionCache().values().stream()) {
LOGGER.debug("All active transactions: {}",