{"record":{"id":"391a6cce2b171d29","repo":"apache/cassandra","slug":"unsupported-record-type-field-s-supported-typ","errorCode":null,"errorMessage":"Unsupported record type field [%s] - supported type is [%s]","messagePattern":"Unsupported record type field \\[(.+?)\\] - supported type is \\[(.+?)\\]","errorType":"exception","errorClass":"org.apache.cassandra.io.util.IORuntimeException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/tools/AuditLogViewer.java","lineNumber":171,"sourceCode":"            }\n\n            throw new IORuntimeException(\"Unsupported record version [\" + version\n                                         + \"] - highest supported version is [\" + BinAuditLogger.CURRENT_VERSION + ']');\n        }\n\n        private boolean isSupportedType(String type)\n        {\n            if (BinAuditLogger.AUDITLOG_TYPE.equals(type))\n            {\n                return true;\n            }\n\n            if (ignoreUnsupported)\n            {\n                return false;\n            }\n\n            throw new IORuntimeException(\"Unsupported record type field [\" + type\n                                         + \"] - supported type is [\" + BinAuditLogger.AUDITLOG_TYPE + ']');\n        }\n    }\n\n    private static class AuditLogViewerOptions\n    {\n        private final List<String> pathList;\n        private String rollCycle = \"FAST_HOURLY\";\n        private boolean follow;\n        private boolean ignoreUnsupported;\n\n        private AuditLogViewerOptions(String[] pathList)\n        {\n            this.pathList = Arrays.asList(pathList);\n        }\n\n        static AuditLogViewerOptions parseArgs(String cmdArgs[])\n        {","sourceCodeStart":153,"sourceCodeEnd":189,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/tools/AuditLogViewer.java#L153-L189","documentation":"Thrown by AuditLogViewer when a binary audit log record's type field is not the expected BinAuditLogger.AUDITLOG_TYPE. The file contains records the viewer does not recognize as audit entries; unless ignoreUnsupported is set, it throws instead of skipping the record.","triggerScenarios":"readMarshallable() calls isSupportedType(type) with a type string other than \"auditlog\" — e.g. corrupted records, a differently formatted chronicle file, or a writer emitting new record types.","commonSituations":"Pointing AuditLogViewer at a non-audit chronicle queue file; reading partially corrupted/truncated audit logs; logs written by a newer version with extra record types.","solutions":["Point the viewer at the correct binary audit log directory (audit bin log files, not other chronicle data)","Enable ignore-unsupported to skip non-audit records","Use matching Cassandra versions for writer and viewer"],"exampleFix":"// before\nviewer.read(wrongQueueFile, false); // records of type 'other'\n// after\nviewer.read(auditBinLogFile, true); // correct file, skip unsupported types","handlingStrategy":"fallback","validationCode":"// verify the file is a bin audit log before viewing\nString type = peekRecordType(file);\nif (!BinAuditLogger.AUDITLOG_TYPE.equals(type)) { /* wrong file */ }","typeGuard":null,"tryCatchPattern":"try { viewer.read(file, ignoreUnsupported); } catch (IORuntimeException e) { if (e.getMessage().startsWith(\"Unsupported record type\")) { /* point at the correct audit log dir or skip */ } else throw e; }","preventionTips":["Point AuditLogViewer only at the configured audit log bin directory","Enable ignore-unsupported for mixed or hand-edited chronicle files","Watch for truncated/corrupt audit log files and re-export them"],"tags":["audit-log","record-type","corrupt-data"],"backgroundTag":"unexpected-response-shape","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"}