{"record":{"id":"e30dd7e840ced39c","repo":"apache/shardingsphere","slug":"invalid-transaction-handle-d-e30dd7","errorCode":null,"errorMessage":"Invalid transaction handle: %d","messagePattern":"Invalid transaction handle: (.+?)","errorType":"exception","errorClass":"InvalidTransactionHandleException","httpStatus":null,"severity":"error","filePath":"proxy/frontend/dialect/firebird/src/main/java/org/apache/shardingsphere/proxy/frontend/firebird/command/query/transaction/FirebirdRollbackTransactionCommandExecutor.java","lineNumber":57,"sourceCode":"    private final FirebirdRollbackTransactionPacket packet;\n    \n    private final ConnectionSession connectionSession;\n    \n    @Override\n    public Collection<DatabasePacket> execute() throws SQLException {\n        int transactionHandle = packet.getTransactionId();\n        validateTransactionHandle(transactionHandle);\n        if (!connectionSession.isAutoCommit()) {\n            ProxyBackendTransactionManager transactionManager = new ProxyBackendTransactionManager(connectionSession.getDatabaseConnectionManager());\n            transactionManager.rollback();\n        }\n        FirebirdTransactionIdGenerator.getInstance().closeTransaction(connectionSession.getConnectionId(), transactionHandle);\n        return Collections.singleton(new FirebirdGenericResponsePacket());\n    }\n    \n    private void validateTransactionHandle(final int transactionHandle) {\n        if (!FirebirdTransactionIdGenerator.getInstance().isTransactionActive(connectionSession.getConnectionId(), transactionHandle)) {\n            throw new InvalidTransactionHandleException(transactionHandle);\n        }\n    }\n}\n","sourceCodeStart":39,"sourceCodeEnd":61,"githubUrl":"https://github.com/apache/shardingsphere/blob/e952770a215630a3659c75d64369168cd3e26b82/proxy/frontend/dialect/firebird/src/main/java/org/apache/shardingsphere/proxy/frontend/firebird/command/query/transaction/FirebirdRollbackTransactionCommandExecutor.java#L39-L61","documentation":"Error \"Invalid transaction handle: %d\" thrown in apache/shardingsphere.","triggerScenarios":"A Firebird op_rollback arrives with a transaction handle the proxy does not recognize.","commonSituations":"Client bugs, reconnects, or duplicated rollback packets referencing an already-closed transaction handle.","solutions":["Use the transaction handle returned by the original start-transaction request.","Ensure the transaction is still open; a committed or rolled-back handle is invalid.","Check that the handle was not corrupted or truncated on the wire."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e952770a215630a3659c75d64369168cd3e26b82","analyzedAt":"2026-08-14T13:54:53.392Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}