-
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] Protocol changes and configuration changes for transaction batch log #16617
Conversation
@liangyepianzhou @congbobo184 @codelipenghui Could you take a look, please? |
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.
Please add an unit test to make sure the configuration is really work and make sure the default value is expected.
conf/broker.conf
Outdated
transactionLogBatchedWriteMaxRecords= 512; | ||
# If enabled the feature that transaction log batch, this attribute means bytes size in a batch. | ||
transactionLogBatchedWriteMaxSize= 1024 * 1024 * 4; |
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.
I think we can't user 1024 * 1024 * 4
here?
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.
conf/broker.conf
Outdated
# persist into a single BK entry. This will make Pulsar transactions work more efficiently, aka batched log. | ||
# see: https://github.com/apache/pulsar/issues/15370 | ||
transactionLogBatchedWriteEnabled = false; |
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.
transactionLogBatchedWriteEnabled = false; | |
transactionLogBatchedWriteEnabled=false; |
Please check all.
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.
@poorbarcode Please update the PR title as the PR really changed. |
conf/broker.conf
Outdated
# persist into a single BK entry. This will make Pulsar transactions work more efficiently, aka batched log. | ||
# see: https://github.com/apache/pulsar/issues/15370 | ||
transactionLogBatchedWriteEnabled = false; | ||
# If enabled the feature that transaction log batch, this attribute means maximum log records count in a batch. | ||
transactionLogBatchedWriteMaxRecords= 512; | ||
# If enabled the feature that transaction log batch, this attribute means bytes size in a batch. | ||
transactionLogBatchedWriteMaxSize= 1024 * 1024 * 4; | ||
# If enabled the feature that transaction log batch, this attribute means maximum wait time(in millis) for the first | ||
# record in a batch | ||
transactionLogBatchedWriteMaxDelayInMillis= 1; | ||
# Provide a mechanism allowing the Pending Ack Store to aggregate multiple records into a batched record and persist | ||
# into a single BK entry. This will make Pulsar transactions work more efficiently, aka batched log. | ||
# see: https://github.com/apache/pulsar/issues/15370 | ||
transactionPendingAckBatchedWriteEnabled = false; | ||
# If enabled the feature that transaction pending ack log batch, this attribute means maximum log records count in a | ||
# batch. | ||
transactionPendingAckBatchedWriteMaxRecords= 512; | ||
# If enabled the feature that transaction pending ack log batch, this attribute means bytes size in a batch. | ||
transactionPendingAckBatchedWriteMaxSize= 1024 * 1024 * 4; | ||
# If enabled the feature that transaction pending ack log batch, this attribute means maximum wait time(in millis) for | ||
# the first record in a batch. | ||
transactionPendingAckBatchedWriteMaxDelayInMillis= 1; |
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.
move to
under
Line 1437 in cfabdf8
### --- Transaction config variables --- ### |
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.
Already Fixed. |
@codelipenghui Thanks much. This is a good way to solve the errors caused by carelessness. 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.
Good work! Leave a few comments.
@FieldContext( | ||
category = CATEGORY_SERVER, | ||
doc = "If enabled the feature that transaction log batch, this attribute means maximum wait time(in millis)" | ||
+ " for the first record in a batch, default 1." |
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.
+ " for the first record in a batch, default 1." | |
+ " for the first record in a batch, default 1 millisecond." |
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.
@FieldContext( | ||
category = CATEGORY_SERVER, | ||
doc = "If enabled the feature that transaction pending ack log batch, this attribute means maximum wait" | ||
+ " time(in millis) for the first record in a batch, default 1." |
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.
+ " time(in millis) for the first record in a batch, default 1." | |
+ " time(in millisecond) for the first record in a batch, default 1 millisecond." |
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,
Another question: Should we add this configuration in standalone.conf?
Already fixed. Thanks |
/pulsarbot run-failure-checks |
Doc status update@poorbarcode has updated relevant docs in a follow-up PR #16764. |
Master Issue: #15370
Motivation
see #15370
Modifications
I will complete proposal #15370 with these pull requests( current pull request is the step-2 ):
TxnLogBufferedWriter
Documentation
doc-required
doc-not-needed
doc
doc-complete