-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[improve][txn] PIP-160: Transaction buffered writer supports Timer #16727
Conversation
/pulsarbot run-failure-checks |
/pulsarbot run-failure-checks |
...r/src/test/java/org/apache/pulsar/transaction/coordinator/impl/TxnLogBufferedWriterTest.java
Outdated
Show resolved
Hide resolved
...r/src/test/java/org/apache/pulsar/transaction/coordinator/impl/TxnLogBufferedWriterTest.java
Outdated
Show resolved
Hide resolved
@@ -73,15 +74,15 @@ | |||
|
|||
private final ManagedLedger managedLedger; | |||
|
|||
private final ScheduledExecutorService scheduledExecutorService; | |||
private Timer timer; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
final
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Already fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…eduledService and Timer
Master Issue: #15370
Motivation
see #15370
Modifications
In the original design of the transaction buffered writer, we use a scheduled executor to execute timed tasks. There are no scheduled executors that match this scenario, and It's a little expensive to have a new scheduled executor with 1 millis tick time.
The
PulsarService.brokerClientSharedTimer
is very match to this scenario, so we should reuse it instead to create a new scheduled executor.So we should make transaction buffered writer supports
io.netty.Timer
.Documentation
doc-required
doc-not-needed
doc
doc-complete