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

Downgrade the tx isolation level of poll message request flow #2614

Merged
merged 1 commit into from
Nov 21, 2024

Conversation

CydeWeys
Copy link
Member

@CydeWeys CydeWeys commented Nov 21, 2024

It doesn't need a higher transaction isolation level as it's only loading a given poll message once, and we want to avoid putting any kind of locks on the PollMessage table as it seems to be having contention issues. Note that the poll message request flow is by far the most frequent code that touches the PollMessage table, as there are many many requests every minute from dozens of registrars, but much fewer poll messages than that to actually ACK.


This change is Reviewable

It doesn't need a higher transaction isolation level as it's only loading a given poll
message once, and we want to avoid putting any kind of locks on the PollMessage table
as it seems to be having contention issues. Note that the poll message request flow
is by far the most frequent code that touches the PollMessage table, as there are many
many requests every minute from dozens of registrars, but much fewer poll messages
than that to actually ACK.
@CydeWeys
Copy link
Member Author

This is a little bit of a shot in the dark, but do let me know what you think of it.

@gbrodman
Copy link
Collaborator

I don't think this should matter given that this queries the replica instance, right?

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.

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @gbrodman and @jianglai)

@CydeWeys
Copy link
Member Author

CydeWeys commented Nov 21, 2024

It will help provide some relief against contention on replica at least, but agreed that it probably doesn't target our main problem.

@CydeWeys CydeWeys added this pull request to the merge queue Nov 21, 2024
Merged via the queue into google:master with commit c7e1fc1 Nov 21, 2024
9 checks passed
@CydeWeys CydeWeys deleted the tx-isolation-lvl-poll-query branch November 21, 2024 23:56
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