{"record":{"id":"5c09ad22cfe0741a","repo":"apache/cassandra","slug":"txnid-not-known","errorCode":null,"errorMessage":"txnId + \" not known\"","messagePattern":"txnId \\+ \" not known\"","errorType":"validation","errorClass":"InvalidRequestException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/db/virtual/AccordDebugKeyspace.java","lineNumber":1846,"sourceCode":"                        recover(txnId, route, result);\n                    });\n                    break;\n                case REQUEUE_PROGRESS_LOG:\n                    run(txnId, commandStoreId, safeStore -> {\n                        ((DefaultProgressLog)safeStore.progressLog()).requeue(safeStore, TxnStateKind.Waiting, txnId);\n                        ((DefaultProgressLog)safeStore.progressLog()).requeue(safeStore, TxnStateKind.Home, txnId);\n                        return AsyncChains.success(null);\n                    });\n            }\n        }\n\n        private void runWithRoute(TxnId txnId, int commandStoreId, Function<Command, BiConsumer<Route<?>, AsyncResult.Settable<Void>>> apply)\n        {\n            run(txnId, commandStoreId, safeStore -> {\n                SafeCommand safeCommand = safeStore.unsafeGet(txnId);\n                Command command = safeCommand.current();\n                if (command == null)\n                    throw new InvalidRequestException(txnId + \" not known\");\n                Node node = AccordService.unsafeInstance().node();\n                AsyncResult.Settable<Void> result = new AsyncResults.SettableResult<>();\n                BiConsumer<Route<?>, AsyncResult.Settable<Void>> consumer = apply.apply(command);\n                if (command.route() == null)\n                {\n                    FetchRoute.fetchRoute(node, txnId, command.maxParticipants(), LatentStoreSelector.standard(), (success, fail) -> {\n                        if (fail != null) result.setFailure(fail);\n                        else consumer.accept(success, result);\n                    });\n                }\n                else\n                {\n                    consumer.accept(command.route(), result);\n                }\n                return result.chain();\n            });\n        }\n","sourceCodeStart":1828,"sourceCodeEnd":1864,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/db/virtual/AccordDebugKeyspace.java#L1828-L1864","documentation":"runWithRoute looks up the command for the given TxnId via safeStore.unsafeGet and throws InvalidRequestException when the store has no such command (safeCommand.current() == null). It means the TxnId supplied to the debug operation does not exist on this node's command store.","triggerScenarios":"INSERTing a route-dependent op (FETCH, etc.) into system_views.accord_txn_ops with a txnId that is unknown to the target command store: mistyped txnId, txn never routed to this node, or txn already fully truncated/evicted.","commonSituations":"Copy-pasting a TxnId from logs of a different node or cluster; querying after a topology change moved the txn to another replica; the command was garbage-collected after apply+truncate, so debug ops can no longer find it.","solutions":["Verify the TxnId string (epoch, node, command id) is copied exactly and belongs to this cluster.","Confirm the txn's command store on THIS node holds the command (check node command-store debug tables) and use the node that owns the range.","If the txn was truncated, the command no longer exists; use historical/truncated debug views instead of FETCH-style ops."],"exampleFix":"// before\nINSERT INTO system_views.accord_txn_ops (txn_id, op) VALUES ('a7f...typo...01', 'FETCH');\n// after\n-- confirm from the debug commands table that this node knows the txn\nSELECT * FROM system_views.accord_commands WHERE txn_id = '<txnId>';","handlingStrategy":"validation","validationCode":"// Confirm the txn exists on this node before route-dependent ops\nResultSet rs = session.execute(\"SELECT * FROM system_views.accord_commands WHERE txn_id = ?\", txnId);\nif (rs.all().isEmpty()) throw new IllegalArgumentException(\"TxnId \" + txnId + \" not known on this node\");","typeGuard":null,"tryCatchPattern":"try {\n    session.execute(fetchOpInsert);\n} catch (InvalidRequestException e) {\n    if (e.getMessage().endsWith(\"not known\")) {\n        // verify txnId, find the owning node, or accept the txn was truncated\n    }\n}","preventionTips":["Copy TxnIds programmatically (from logs/tables), never by hand.","Verify the node you target is a replica that owns the txn's range.","Remember commands are evicted after truncate; very old txn ids may no longer exist anywhere."],"tags":["accord","unknown-txnid","resource-not-found","debug-ops"],"backgroundTag":"resource-not-found","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}