diff --git a/kafka-impl/src/main/java/io/streamnative/pulsar/handlers/kop/KafkaRequestHandler.java b/kafka-impl/src/main/java/io/streamnative/pulsar/handlers/kop/KafkaRequestHandler.java index 89d37ecb75..4ec2b706de 100644 --- a/kafka-impl/src/main/java/io/streamnative/pulsar/handlers/kop/KafkaRequestHandler.java +++ b/kafka-impl/src/main/java/io/streamnative/pulsar/handlers/kop/KafkaRequestHandler.java @@ -211,6 +211,12 @@ @Getter public class KafkaRequestHandler extends KafkaCommandDecoder { private static final int THROTTLE_TIME_MS = 10; + /** + * Request timeout for writes of the TXMARKERS + * Writing the TXMARKERS require recovery of the + * transactions on the PartitionLog at it may take much time. + */ + private static final int WRITE_TXN_MARKERS_TIMEOUT = 120000; private static final String POLICY_ROOT = "/admin/policies/"; private final PulsarService pulsarService; @@ -2441,7 +2447,7 @@ protected void handleWriteTxnMarkers(KafkaHeaderAndRequest kafkaHeaderAndRequest this.pendingTopicFuturesMap, ctx); getReplicaManager().appendRecords( - kafkaConfig.getRequestTimeoutMs(), + WRITE_TXN_MARKERS_TIMEOUT, (short) 1, true, currentNamespacePrefix(),