From 5d22be430b334c89ecb0c77709d5a1d949931e30 Mon Sep 17 00:00:00 2001 From: "b.tian" Date: Wed, 17 Jan 2024 11:31:10 +0800 Subject: [PATCH] add TwoPhaseCommitter new Constructor contains executorService(#774) --- src/main/java/org/tikv/txn/TwoPhaseCommitter.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/main/java/org/tikv/txn/TwoPhaseCommitter.java b/src/main/java/org/tikv/txn/TwoPhaseCommitter.java index 550b7de47ac..d85c2e0e6f8 100644 --- a/src/main/java/org/tikv/txn/TwoPhaseCommitter.java +++ b/src/main/java/org/tikv/txn/TwoPhaseCommitter.java @@ -101,6 +101,21 @@ public TwoPhaseCommitter(TiSession session, long startTime, long lockTTL) { createExecutorService(WRITE_BUFFER_SIZE)); } + public TwoPhaseCommitter( + TiSession session, long startTime, long lockTTL, ExecutorService executorService) { + this( + session, + startTime, + lockTTL, + TXN_COMMIT_BATCH_SIZE, + TXN_COMMIT_BATCH_SIZE, + WRITE_BUFFER_SIZE, + 1, + true, + 3, + executorService); + } + TwoPhaseCommitter( TiSession session, long startTime,