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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user