{"record":{"id":"41415a1d5e105f33","repo":"apache/cassandra","slug":"unsupported-record-version-version-highest","errorCode":null,"errorMessage":"Unsupported record version [${version}] - highest supported version is [${CURRENT_VERSION}]","messagePattern":"Unsupported record version \\[(.+?)\\] - highest supported version is \\[(.+?)\\]","errorType":"exception","errorClass":"IORuntimeException","httpStatus":null,"severity":"error","filePath":"tools/fqltool/src/org/apache/cassandra/fqltool/FQLQueryReader.java","lineNumber":126,"sourceCode":"                                           queryStartTime,\n                                           generatedTimestamp,\n                                           generatedNowInSeconds,\n                                           batchType,\n                                           queries,\n                                           values);\n                break;\n            default:\n                throw new IORuntimeException(\"Unhandled record type: \" + type);\n        }\n    }\n\n    private void verifyVersion(WireIn wireIn)\n    {\n        int version = wireIn.read(VERSION).int16();\n\n        if (version > CURRENT_VERSION)\n        {\n            throw new IORuntimeException(\"Unsupported record version [\" + version\n                                         + \"] - highest supported version is [\" + CURRENT_VERSION + ']');\n        }\n    }\n\n    private String readType(WireIn wireIn) throws IORuntimeException\n    {\n        String type = wireIn.read(TYPE).text();\n        if (!SINGLE_QUERY.equals(type) && !BATCH.equals(type))\n        {\n            throw new IORuntimeException(\"Unsupported record type field [\" + type\n                                         + \"] - supported record types are [\" + SINGLE_QUERY + \", \" + BATCH + ']');\n        }\n\n        return type;\n    }\n\n    public FQLQuery getQuery()\n    {","sourceCodeStart":108,"sourceCodeEnd":144,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/tools/fqltool/src/org/apache/cassandra/fqltool/FQLQueryReader.java#L108-L144","documentation":"FQLQueryReader.verifyVersion reads a 16-bit version number from the record header and rejects it if it exceeds CURRENT_VERSION, the highest format version this reader understands. The full-query-log format is versioned; older readers cannot safely parse records written by newer writers.","triggerScenarios":"Reading a record (via readMarshallable) whose VERSION field is greater than FQLQueryReader.CURRENT_VERSION, e.g. a log written by a newer Cassandra release.","commonSituations":"Upgrading Cassandra to a release that bumped the binlog format version, then replaying those logs with an older fqltool build; mixed-version clusters sharing log files.","solutions":["Upgrade fqltool/Cassandra so CURRENT_VERSION is at least the log's version","Re-capture the query log with the current tool version","Inspect the log's version field with fqltool dump to confirm the mismatch"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// peek the version before full parsing, mirroring verifyVersion\nint version = readVersionField(logFile);\nif (version > CURRENT_VERSION) throw new UnsupportedOperationException(\"log version \" + version + \" newer than supported \" + CURRENT_VERSION);","typeGuard":null,"tryCatchPattern":"try { replay(log); } catch (IORuntimeException e) { if (e.getMessage().contains(\"Unsupported record version\")) { log.error(\"Upgrade fqltool to read this log\"); } else throw e; }","preventionTips":["Upgrade the tool before replaying logs from upgraded clusters","Version-stamp and archive logs with the Cassandra version that wrote them","Test cross-version log reads in mixed-version staging"],"tags":["serialization","versioning","compatibility"],"backgroundTag":"incompatible-source-type","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"}