You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/07/21 02:55:50 UTC
[GitHub] [pulsar] Technoboy- commented on a diff in pull request #16685: [improve][txn] PIP-160: Transaction log store enables the batch feature
Technoboy- commented on code in PR #16685:
URL: https://github.com/apache/pulsar/pull/16685#discussion_r926207942
##########
pulsar-broker/src/test/java/org/apache/pulsar/broker/stats/ManagedLedgerMetricsTest.java:
##########
@@ -94,17 +97,24 @@ public void testManagedLedgerMetrics() throws Exception {
@Test
public void testTransactionTopic() throws Exception {
+ TxnLogBufferedWriterConfig txnLogBufferedWriterConfig = new TxnLogBufferedWriterConfig();
+ txnLogBufferedWriterConfig.setBatchEnabled(false);
+ ScheduledExecutorService scheduledExecutorService = Executors.newScheduledThreadPool(2);
admin.tenants().createTenant(NamespaceName.SYSTEM_NAMESPACE.getTenant(),
new TenantInfoImpl(Sets.newHashSet("appid1"), Sets.newHashSet("test")));
admin.namespaces().createNamespace(NamespaceName.SYSTEM_NAMESPACE.toString());
createTransactionCoordinatorAssign();
ManagedLedgerConfig managedLedgerConfig = new ManagedLedgerConfig();
managedLedgerConfig.setMaxEntriesPerLedger(2);
- new MLTransactionLogImpl(TransactionCoordinatorID.get(0),
- pulsar.getManagedLedgerFactory(), managedLedgerConfig)
- .initialize().join();
+ MLTransactionLogImpl mlTransactionLog = new MLTransactionLogImpl(TransactionCoordinatorID.get(0),
+ pulsar.getManagedLedgerFactory(), managedLedgerConfig, txnLogBufferedWriterConfig,
+ scheduledExecutorService);
+ mlTransactionLog.initialize().join();
Review Comment:
It's better to add a timeout on the method or here.
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org