codelipenghui commented on code in PR #16758:
URL: https://github.com/apache/pulsar/pull/16758#discussion_r947614107
##########
pulsar-transaction/coordinator/src/main/java/org/apache/pulsar/transaction/coordinator/impl/TxnLogBufferedWriter.java:
##########
@@ -143,6 +153,10 @@ public TxnLogBufferedWriter(ManagedLedger managedLedger,
OrderedExecutor ordered
DataSerializer<T> dataSerializer,
int batchedWriteMaxRecords, int
batchedWriteMaxSize, int batchedWriteMaxDelayInMillis,
boolean batchEnabled,
TxnLogBufferedWriterMetricsStats metrics){
+ if (batchedWriteMaxRecords <= 1 && batchEnabled){
+ log.warn("The current maximum number of records per batch is set
to 1. Disabling Batch will improve"
Review Comment:
> Thinking out loud - @codelipenghui - do you think it's better to do this
type of validation and change when processing configuration?
Yes, I support having a validation when processing configuration. E.g.
batchedWriteMaxRecords >= 10, size >= 128k
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]