{"record":{"id":"d01afca21ce97c81","repo":"apache/pulsar","slug":"transaction","errorCode":null,"errorMessage":"Transaction `","messagePattern":"Transaction `","errorType":"exception","errorClass":"TransactionBufferException.TransactionNotFoundException","httpStatus":null,"severity":"error","filePath":"pulsar-broker/src/main/java/org/apache/pulsar/broker/transaction/buffer/impl/InMemTransactionBuffer.java","lineNumber":245,"sourceCode":"        }\n    }\n\n    @Override\n    public CompletableFuture<TransactionMeta> getTransactionMeta(TxnID txnID) {\n        CompletableFuture<TransactionMeta> getFuture = new CompletableFuture<>();\n        try {\n            getFuture.complete(getTxnBufferOrThrowNotFoundException(txnID));\n        } catch (TransactionBufferException.TransactionNotFoundException e) {\n            getFuture.completeExceptionally(e);\n        }\n        return getFuture;\n    }\n\n    private TxnBuffer getTxnBufferOrThrowNotFoundException(TxnID txnID)\n            throws TransactionBufferException.TransactionNotFoundException {\n        TxnBuffer buffer = buffers.get(txnID);\n        if (null == buffer) {\n            throw new TransactionBufferException.TransactionNotFoundException(\n                \"Transaction `\" + txnID + \"` doesn't exist in the transaction buffer\");\n        }\n        return buffer;\n    }\n\n    private TxnBuffer getTxnBufferOrCreateIfNotExist(TxnID txnID) {\n        TxnBuffer buffer = buffers.get(txnID);\n        if (null == buffer) {\n            TxnBuffer newBuffer = new TxnBuffer(txnID);\n            TxnBuffer oldBuffer = buffers.putIfAbsent(txnID, newBuffer);\n            if (null != oldBuffer) {\n                newBuffer.close();\n                return oldBuffer;\n            } else {\n                return newBuffer;\n            }\n        } else {\n            return buffer;","sourceCodeStart":227,"sourceCodeEnd":263,"githubUrl":"https://github.com/apache/pulsar/blob/820761864ed8e2a7d2e52dd9763ad2ae117c1395/pulsar-broker/src/main/java/org/apache/pulsar/broker/transaction/buffer/impl/InMemTransactionBuffer.java#L227-L263","documentation":"getTxnBufferOrThrowNotFoundException prefix guard: the transaction ID does not map to an open transaction buffer in the in-memory transaction buffer — the transaction is unknown, already committed/aborted, or malformed.","triggerScenarios":"Thrown at pulsar-broker/src/main/java/org/apache/pulsar/broker/transaction/buffer/impl/InMemTransactionBuffer.java:245 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a valid, active TxnID returned by newTransaction","Check the transaction timeout settings; the txn may have been aborted"],"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"}