{"record":{"id":"21f16c88a281b5c5","repo":"apache/cassandra","slug":"log-entry-of-unsupported-type-type","errorCode":null,"errorMessage":"Log entry of unsupported type ${type}","messagePattern":"Log entry of unsupported type (.+?)","errorType":"exception","errorClass":"IORuntimeException","httpStatus":null,"severity":"error","filePath":"tools/fqltool/src/org/apache/cassandra/fqltool/commands/Dump.java","lineNumber":135,"sourceCode":"              .append(System.lineSeparator());\n\n            long generatedNowInSeconds = wireIn.read(FullQueryLogger.GENERATED_NOW_IN_SECONDS).int64();\n            sb.append(\"Generated nowInSeconds:\")\n              .append(generatedNowInSeconds)\n              .append(System.lineSeparator());\n\n            switch (type)\n            {\n                case (FullQueryLogger.SINGLE_QUERY):\n                    dumpQuery(options, wireIn, sb);\n                    break;\n\n                case (FullQueryLogger.BATCH):\n                    dumpBatch(wireIn, sb);\n                    break;\n\n                default:\n                    throw new IORuntimeException(\"Log entry of unsupported type \" + type);\n            }\n\n            System.out.print(sb.toString());\n            System.out.flush();\n        };\n\n        //Backoff strategy for spinning on the queue, not aggressive at all as this doesn't need to be low latency\n        Pauser pauser = Pauser.millis(100);\n        List<ChronicleQueue> queues = arguments.stream().distinct().map(path -> SingleChronicleQueueBuilder.single(new File(path)).readOnly(true).rollCycle(RollCycles.valueOf(rollCycle)).build()).collect(Collectors.toList());\n        List<ExcerptTailer> tailers = queues.stream().map(ChronicleQueue::createTailer).collect(Collectors.toList());\n        boolean hadWork = true;\n        while (hadWork)\n        {\n            hadWork = false;\n            for (ExcerptTailer tailer : tailers)\n            {\n                while (tailer.readDocument(reader))\n                {","sourceCodeStart":117,"sourceCodeEnd":153,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/tools/fqltool/src/org/apache/cassandra/fqltool/commands/Dump.java#L117-L153","documentation":"In Dump.dump, after the type string is validated, it is dispatched in a switch to dumpSingleQuery or dumpBatch. The default branch throws this IORuntimeException — a defensive backstop for any type that slipped past earlier checks or was introduced later. It should be unreachable for well-formed current-version logs.","triggerScenarios":"The switch encounters a type string matching neither SINGLE_QUERY nor BATCH — only possible if the type constant values changed between versions or the earlier validation was bypassed.","commonSituations":"Constant-value drift between Cassandra versions; logs from a newer release with an added record type.","solutions":["Ensure the Dump tool and the log-writing Cassandra come from matching versions","Re-capture the log with the current version","If developing, keep validation and switch cases in sync with FullQueryLogger constants"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { dump(file); } catch (IORuntimeException e) { if (e.getMessage().startsWith(\"Log entry of unsupported type\")) { exitWith(\"tool/log version mismatch; upgrade fqltool\"); } else throw e; }","preventionTips":["Match tool version to the cluster that wrote the logs","Keep record-type constants shared between writer and reader","Add tests covering both record types when changing the format"],"tags":["serialization","deserialization","dispatch"],"backgroundTag":"unsupported-operation","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"}