Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[close #774] Add TwoPhaseCommitter new Constructor contains executorService(#774) #775

Merged
merged 5 commits into from
Jun 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/main/java/org/tikv/txn/TwoPhaseCommitter.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ public TwoPhaseCommitter(TiSession session, long startTime) {
}

public TwoPhaseCommitter(TiSession session, long startTime, long lockTTL) {
this(session, startTime, lockTTL, createExecutorService(WRITE_BUFFER_SIZE));
}

public TwoPhaseCommitter(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change previous constructor method to this(session,startTime,lockTTL,createExecutorService(WRITE_BUFFER_SIZE));
image

TiSession session, long startTime, long lockTTL, ExecutorService executorService) {
this(
session,
startTime,
Expand All @@ -98,7 +103,7 @@ public TwoPhaseCommitter(TiSession session, long startTime, long lockTTL) {
1,
true,
3,
createExecutorService(WRITE_BUFFER_SIZE));
executorService);
}

TwoPhaseCommitter(
Expand Down
Loading