1
0
mirror of https://github.com/google/nomulus synced 2025-12-23 06:15:42 +00:00

Remove transaction duration logging (#2748)

We suspected this could be a cause of optimistic locking failures
(because long transactions would lead to optimistic locks not being
released) but this didn't end up being the case. Let's remove this to
reduce log spam.
This commit is contained in:
gbrodman
2025-04-22 14:53:21 -04:00
committed by GitHub
parent 083a9dc8c9
commit 0472dda860

View File

@@ -276,10 +276,6 @@ public class JpaTransactionManagerImpl implements JpaTransactionManager {
}
T result = work.call();
txn.commit();
long duration = clock.nowUtc().getMillis() - txnInfo.transactionTime.getMillis();
if (duration >= 100) {
logger.atInfo().log("Transaction duration: %d milliseconds", duration);
}
return result;
} catch (Throwable e) {
// Catch a Throwable here so even Errors would lead to a rollback.