1
0
mirror of https://github.com/google/nomulus synced 2025-12-23 14:25:44 +00:00

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

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 commit is contained in:
Ben McIlwain
2024-11-21 17:49:57 -05:00
committed by GitHub
parent 0c0b0df36e
commit c7e1fc17d2

View File

@@ -32,6 +32,8 @@ import google.registry.model.eppoutput.EppResponse;
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;
@@ -47,6 +49,7 @@ import org.joda.time.DateTime;
*
* @error {@link PollRequestFlow.UnexpectedMessageIdException}
*/
@IsolationLevel(value = TransactionIsolationLevel.TRANSACTION_READ_COMMITTED)
public final class PollRequestFlow implements TransactionalFlow {
@Inject ExtensionManager extensionManager;