Class TxnLogBufferedWriter<T>

java.lang.Object
org.apache.pulsar.transaction.coordinator.impl.TxnLogBufferedWriter<T>

public class TxnLogBufferedWriter<T> extends Object
See PIP-160: https://github.com/apache/pulsar/issues/15516. Buffer requests and flush to Managed Ledger. Transaction Log Store And Pending Ack Store will no longer write to Managed Ledger directly, Change to using this class to write Ledger data. Caches “write requests” for a certain number or a certain size of request data and then writes them to the Managed Ledger in one go. After Managed Ledger has written complete, responds to each request-caller. In this process, Managed Ledger doesn't care how many records(or what to be written) in the Entry, it just treats them as a single block of data. The first write-request by transaction components will take a long time to receive a response, because we must wait for subsequent requests to accumulate enough data to actually start writing to the Managed Ledger. To control the maximum latency, we will mark the first request time for each batch, and additional timing triggers writes. You can enable or disabled the batch feature, will use Managed Ledger directly and without batching when disabled.