{"record":{"id":"e629fb837789c17f","repo":"apache/pulsar","slug":"transactioncoordinatorscalabletopicsparallelism-mi","errorCode":null,"errorMessage":"transactionCoordinatorScalableTopicsParallelism mismatch: this broker is configured with ${partitionCount} but the cluster was initialized with ${stored}. The value is fixed at cluster bring-up and must be identical on every broker.","messagePattern":"transactionCoordinatorScalableTopicsParallelism mismatch: this broker is configured with (.+?) but the cluster was initialized with (.+?)\\. The value is fixed at cluster bring-up and must be identical on every broker\\.","errorType":"console","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"pulsar-broker/src/main/java/org/apache/pulsar/broker/transaction/coordinator/v5/TransactionCoordinatorV5.java","lineNumber":219,"sourceCode":"                checkParallelismMatches(existing.get().getValue());\n            }\n        } catch (IllegalStateException e) {\n            throw e;\n        } catch (Exception e) {\n            // A racing create (BadVersion) or read-after-write resolves by re-reading and comparing.\n            try {\n                var after = store.get(TxnPaths.TXN_TC_PARALLELISM_PATH).get();\n                after.ifPresent(r -> checkParallelismMatches(r.getValue()));\n            } catch (Exception ignore) {\n                log.warn().exception(e).log(\"Could not verify TC parallelism consistency; proceeding\");\n            }\n        }\n    }\n\n    private void checkParallelismMatches(byte[] storedValue) {\n        int stored = Integer.parseInt(new String(storedValue, java.nio.charset.StandardCharsets.UTF_8).trim());\n        if (stored != partitionCount) {\n            throw new IllegalStateException(\n                    \"transactionCoordinatorScalableTopicsParallelism mismatch: this broker is configured\"\n                            + \" with \" + partitionCount + \" but the cluster was initialized with \" + stored\n                            + \". The value is fixed at cluster bring-up and must be identical on every\"\n                            + \" broker.\");\n        }\n    }\n\n    /** Stop the sweeps and release every leader-election lease. Idempotent. */\n    public synchronized void close() {\n        closed = true;\n        if (sweepExecutor != null) {\n            sweepExecutor.shutdownNow();\n            sweepExecutor = null;\n        }\n        elections.values().forEach(e -> e.asyncClose().exceptionally(ex -> {\n            log.warn().exception(ex).log(\"v5 TC election close failed\");\n            return null;\n        }));","sourceCodeStart":201,"sourceCodeEnd":237,"githubUrl":"https://github.com/apache/pulsar/blob/820761864ed8e2a7d2e52dd9763ad2ae117c1395/pulsar-broker/src/main/java/org/apache/pulsar/broker/transaction/coordinator/v5/TransactionCoordinatorV5.java#L201-L237","documentation":"Error \"transactionCoordinatorScalableTopicsParallelism mismatch: this broker is configured with ${partitionCount} but the cluster was initialized with ${stored}. The value is fixed at cluster bring-up and must be identical on every broker.\" thrown in apache/pulsar.","triggerScenarios":"Thrown at pulsar-broker/src/main/java/org/apache/pulsar/broker/transaction/coordinator/v5/TransactionCoordinatorV5.java:219 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set transactionCoordinatorScalableTopicsParallelism to the value the cluster was initialized with on every broker","Bring up a new cluster with the intended value if a change is unavoidable (it cannot be changed in place)"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"820761864ed8e2a7d2e52dd9763ad2ae117c1395","analyzedAt":"2026-09-06T00:14:20.138Z","contentChangedAt":"2026-09-06T00:14:20.138Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}