{"record":{"id":"d07b1c5e6a80aa79","repo":"apache/pulsar","slug":"transactionlogbatchedwritemaxsize-value-must-be","errorCode":null,"errorMessage":"'transactionLogBatchedWriteMaxSize' value must be greater than or equal to 128k","messagePattern":"'transactionLogBatchedWriteMaxSize' value must be greater than or equal to 128k","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"pulsar-broker/src/main/java/org/apache/pulsar/broker/validator/TransactionBatchedWriteValidator.java","lineNumber":47,"sourceCode":"                        + \"'transactionPendingAckBatchedWriteMaxRecords' value must be greater than or equal to 10\");\n            }\n            if (configuration.getTransactionPendingAckBatchedWriteMaxSize() < 1024 * 128){\n                throw new IllegalArgumentException(\"Configuration field \"\n                        + \"'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":29,"sourceCodeEnd":57,"githubUrl":"https://github.com/apache/pulsar/blob/820761864ed8e2a7d2e52dd9763ad2ae117c1395/pulsar-broker/src/main/java/org/apache/pulsar/broker/validator/TransactionBatchedWriteValidator.java#L29-L57","documentation":"When transactionLogBatchedWriteEnabled=true, transactionLogBatchedWriteMaxSize must be at least 128k (131072 bytes). The validator rejects smaller sizes with IllegalArgumentException to guarantee transaction log batches have a meaningful size floor.","triggerScenarios":"Broker startup/config reload with transactionLogBatchedWriteEnabled=true and transactionLogBatchedWriteMaxSize < 131072 (e.g. set in bytes as 1024 or mistakenly in KB).","commonSituations":"Units confusion — operators enter a KB value where bytes are expected; attempts to minimize memory footprint; configs ported from other systems' batch-size conventions.","solutions":["Set transactionLogBatchedWriteMaxSize to 131072 or more (bytes) in broker.conf","Double-check the units: this field is in bytes, not KB/MB","If lowering memory usage is the goal, keep the 128k floor and tune maxRecords/maxDelay instead"],"exampleFix":"// before (broker.conf)\ntransactionLogBatchedWriteEnabled=true\ntransactionLogBatchedWriteMaxSize=65536\n// after\ntransactionLogBatchedWriteEnabled=true\ntransactionLogBatchedWriteMaxSize=131072","handlingStrategy":"validation","validationCode":"int maxSize = config.getTransactionLogBatchedWriteMaxSize();\nif (config.isTransactionLogBatchedWriteEnabled() && maxSize < 1024 * 128) {\n    throw new IllegalArgumentException(\"transactionLogBatchedWriteMaxSize must be >= 131072 bytes, got \" + maxSize);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always express this field in bytes; annotate configs with the unit","Use constants (e.g. 128 * 1024) in automation instead of raw suspicious values","Validate config before deploy in CI"],"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"}