Skip to content

Commit

Permalink
Downgrade the tx isolation level of poll message request flow (#2614)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
CydeWeys authored Nov 21, 2024
1 parent 0c0b0df commit c7e1fc1
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
import google.registry.model.poll.MessageQueueInfo;
import google.registry.model.poll.PollMessage;
import google.registry.model.poll.PollMessageExternalKeyConverter;
import google.registry.persistence.IsolationLevel;
import google.registry.persistence.PersistenceModule.TransactionIsolationLevel;
import java.util.Optional;
import javax.inject.Inject;
import org.joda.time.DateTime;
Expand All @@ -47,6 +49,7 @@
*
* @error {@link PollRequestFlow.UnexpectedMessageIdException}
*/
@IsolationLevel(value = TransactionIsolationLevel.TRANSACTION_READ_COMMITTED)
public final class PollRequestFlow implements TransactionalFlow {

@Inject ExtensionManager extensionManager;
Expand Down

0 comments on commit c7e1fc1

Please sign in to comment.