Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Commit

Permalink
Use a dedicated timeout for WRITE_TXN_MARKERS and disable kafkaTxnPur…
Browse files Browse the repository at this point in the history
…geAbortedTxnIntervalSeconds by default

(cherry picked from commit e1e4562)
  • Loading branch information
eolivelli authored and gaoran10 committed Jul 20, 2023
1 parent 1dda879 commit 64f2c2d
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -2441,7 +2447,7 @@ protected void handleWriteTxnMarkers(KafkaHeaderAndRequest kafkaHeaderAndRequest
this.pendingTopicFuturesMap,
ctx);
getReplicaManager().appendRecords(
kafkaConfig.getRequestTimeoutMs(),
WRITE_TXN_MARKERS_TIMEOUT,
(short) 1,
true,
currentNamespacePrefix(),
Expand Down

0 comments on commit 64f2c2d

Please sign in to comment.