Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log transaction durations #2682

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

gbrodman
Copy link
Collaborator

@gbrodman gbrodman commented Feb 20, 2025

There can be delays in releasing predicate locks when we have transactions that are long-lived -- even delays in releasing predicate locks acquired by shorter-lived transactions. Logging the transaction duration will allow us to get a sense as to transaction durations during busy times.


This change is Reviewable

Copy link
Collaborator

@weiminyu weiminyu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion


core/src/main/java/google/registry/persistence/transaction/JpaTransactionManagerImpl.java line 279 at r1 (raw file):

      T result = work.call();
      txn.commit();
      logger.atInfo().log(

Consider throttling using logger's atMostEvery method or filter out very short transactions.

Code quote:

logger.atInfo().log(

Copy link
Collaborator Author

@gbrodman gbrodman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @weiminyu)


core/src/main/java/google/registry/persistence/transaction/JpaTransactionManagerImpl.java line 279 at r1 (raw file):

Previously, weiminyu (Weimin Yu) wrote…

Consider throttling using logger's atMostEvery method or filter out very short transactions.

yeah, maybe we can filter out ones less than.....100ms?

There can be delays in releasing predicate locks when we have
transactions that are long-lived -- even delays in releasing predicate
locks acquired by shorter-lived transactions. Logging the transaction
duration will allow us to get a sense as to transaction durations during
busy times.
@gbrodman gbrodman added the kokoro:force-run Force a Kokoro build. label Feb 24, 2025
@domain-registry-eng domain-registry-eng removed the kokoro:force-run Force a Kokoro build. label Feb 24, 2025
@gbrodman gbrodman added the kokoro:force-run Force a Kokoro build. label Feb 24, 2025
@domain-registry-eng domain-registry-eng removed the kokoro:force-run Force a Kokoro build. label Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants