Skip to content

Commit 700fad0

Browse files
jackjeyisb.tianiosmanthusshiyuhang0
authored
[close #774] Add TwoPhaseCommitter new Constructor contains executorService(#774) (#775)
* add TwoPhaseCommitter new Constructor contains executorService(#774) Signed-off-by: b.tian <b.tian@trip.com> * [close #671] remove shadowing of netty && grpc (#781) Signed-off-by: b.tian <b.tian@trip.com> * [close #782] bump grpc to 1.60.0 (#783) Signed-off-by: b.tian <b.tian@trip.com> * [close #774]remove redundant code --------- Signed-off-by: b.tian <b.tian@trip.com> Co-authored-by: b.tian <b.tian@trip.com> Co-authored-by: iosmanthus <dengliming@pingcap.com> Co-authored-by: shi yuhang <52435083+shiyuhang0@users.noreply.github.com>
1 parent ca8a622 commit 700fad0

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/main/java/org/tikv/txn/TwoPhaseCommitter.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,11 @@ public TwoPhaseCommitter(TiSession session, long startTime) {
8888
}
8989

9090
public TwoPhaseCommitter(TiSession session, long startTime, long lockTTL) {
91+
this(session, startTime, lockTTL, createExecutorService(WRITE_BUFFER_SIZE));
92+
}
93+
94+
public TwoPhaseCommitter(
95+
TiSession session, long startTime, long lockTTL, ExecutorService executorService) {
9196
this(
9297
session,
9398
startTime,
@@ -98,7 +103,7 @@ public TwoPhaseCommitter(TiSession session, long startTime, long lockTTL) {
98103
1,
99104
true,
100105
3,
101-
createExecutorService(WRITE_BUFFER_SIZE));
106+
executorService);
102107
}
103108

104109
TwoPhaseCommitter(

0 commit comments

Comments
 (0)