{"record":{"id":"fcc50ad317a1e6ec","repo":"apache/pulsar","slug":"transactionlogbatchedwritemaxdelayinmillis-value","errorCode":null,"errorMessage":"'transactionLogBatchedWriteMaxDelayInMillis' value must be greater than or equal to 1","messagePattern":"'transactionLogBatchedWriteMaxDelayInMillis' value must be greater than or equal to 1","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"pulsar-broker/src/main/java/org/apache/pulsar/broker/validator/TransactionBatchedWriteValidator.java","lineNumber":51,"sourceCode":"                        + \"'transactionPendingAckBatchedWriteMaxSize' value must be greater than or equal to 128k\");\n            }\n            if (configuration.getTransactionPendingAckBatchedWriteMaxDelayInMillis() < 1){\n                throw new IllegalArgumentException(\"Configuration field \"\n                        + \"'transactionPendingAckBatchedWriteMaxDelayInMillis' value must be greater than or equal to\"\n                        + \" 1\");\n            }\n        }\n        if (configuration.isTransactionLogBatchedWriteEnabled()){\n            if (configuration.getTransactionLogBatchedWriteMaxRecords() < 10){\n                throw new IllegalArgumentException(\"Configuration field \"\n                        + \"'transactionLogBatchedWriteMaxRecords' value must be greater than or equal to 10\");\n            }\n            if (configuration.getTransactionLogBatchedWriteMaxSize() < 1024 * 128){\n                throw new IllegalArgumentException(\"Configuration field \"\n                        + \"'transactionLogBatchedWriteMaxSize' value must be greater than or equal to 128k\");\n            }\n            if (configuration.getTransactionLogBatchedWriteMaxDelayInMillis() < 1){\n                throw new IllegalArgumentException(\"Configuration field \"\n                        + \"'transactionLogBatchedWriteMaxDelayInMillis' value must be greater than or equal to 1\");\n            }\n        }\n    }\n}\n","sourceCodeStart":33,"sourceCodeEnd":57,"githubUrl":"https://github.com/apache/pulsar/blob/820761864ed8e2a7d2e52dd9763ad2ae117c1395/pulsar-broker/src/main/java/org/apache/pulsar/broker/validator/TransactionBatchedWriteValidator.java#L33-L57","documentation":"When transactionLogBatchedWriteEnabled=true, transactionLogBatchedWriteMaxDelayInMillis must be >= 1. A value of 0 or negative is rejected with IllegalArgumentException by TransactionBatchedWriteValidator before the broker can start with batched transaction-log writes.","triggerScenarios":"Broker startup/config reload with transactionLogBatchedWriteEnabled=true and transactionLogBatchedWriteMaxDelayInMillis=0 (often the untouched default) or negative.","commonSituations":"Enabling batching while leaving delay at its 0 default; templated configs that only set the enable flag; assuming 0 means 'flush immediately' when the validator requires at least 1 ms.","solutions":["Set transactionLogBatchedWriteMaxDelayInMillis=1 or higher in broker.conf","Set all sibling fields together: maxRecords >= 10, maxSize >= 131072, maxDelayInMillis >= 1","Validate the generated broker.conf in CI before deploying"],"exampleFix":"// before (broker.conf)\ntransactionLogBatchedWriteEnabled=true\ntransactionLogBatchedWriteMaxDelayInMillis=0\n// after\ntransactionLogBatchedWriteEnabled=true\ntransactionLogBatchedWriteMaxDelayInMillis=5","handlingStrategy":"validation","validationCode":"int maxDelay = config.getTransactionLogBatchedWriteMaxDelayInMillis();\nif (config.isTransactionLogBatchedWriteEnabled() && maxDelay < 1) {\n    throw new IllegalArgumentException(\"transactionLogBatchedWriteMaxDelayInMillis must be >= 1, got \" + maxDelay);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never ship 0 for this field when batching is enabled; use 1 ms as the minimum","Bundle all four transaction batched-write fields in one validated config block","Test broker startup with the final generated broker.conf before rollout"],"tags":["configuration","pulsar","transactions","broker-startup"],"backgroundTag":"invalid-config-value","analyzedSha":"820761864ed8e2a7d2e52dd9763ad2ae117c1395","analyzedAt":"2026-09-06T00:14:20.138Z","contentChangedAt":"2026-09-06T00:14:20.138Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}