{"record":{"id":"7718bc85f1796340","repo":"alibaba/canal","slug":"not-implement-yet","errorCode":null,"errorMessage":"Not implement yet","messagePattern":"Not implement yet","errorType":"exception","errorClass":"NullPointerException","httpStatus":null,"severity":"error","filePath":"parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/MysqlConnection.java","lineNumber":255,"sourceCode":"                List<LogEvent> iterateEvents = decoder.processIterateDecode(event, context);\n                if (!iterateEvents.isEmpty()) {\n                    // 处理compress event\n                    for (LogEvent itEvent : iterateEvents) {\n                        if (!func.sink(event)) {\n                            break;\n                        }\n                    }\n                } else {\n                    if (!func.sink(event)) {\n                        break;\n                    }\n                }\n            }\n        }\n    }\n\n    public void dump(long timestamp, SinkFunction func) throws IOException {\n        throw new NullPointerException(\"Not implement yet\");\n    }\n\n    @Override\n    public void dump(String binlogfilename, Long binlogPosition, MultiStageCoprocessor coprocessor) throws IOException {\n        updateSettings();\n        loadBinlogChecksum();\n        loadVersionComment();\n        sendRegisterSlave();\n        sendBinlogDump(binlogfilename, binlogPosition);\n        ((MysqlMultiStageCoprocessor) coprocessor).setConnection(this);\n        ((MysqlMultiStageCoprocessor) coprocessor).setBinlogChecksum(binlogChecksum);\n        ((MysqlMultiStageCoprocessor) coprocessor).setCompatiablePercona(compatiablePercona);\n        try (DirectLogFetcher fetcher = new DirectLogFetcher(connector.getReceiveBufferSize())) {\n            fetcher.start(connector.getChannel());\n            while (fetcher.fetch()) {\n                accumulateReceivedBytes(fetcher.limit());\n                LogBuffer buffer = fetcher.duplicate();\n                fetcher.consume(fetcher.limit());","sourceCodeStart":237,"sourceCodeEnd":273,"githubUrl":"https://github.com/alibaba/canal/blob/87be50e87686a3e8af08c368d0e1ffd1f59eb04a/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/MysqlConnection.java#L237-L273","documentation":"MysqlConnection.dump(long timestamp, SinkFunction func) is declared as part of the ErosaConnection contract but was never implemented — the body literally throws new NullPointerException(\"Not implement yet\"). Canal only supports binlog replication by filename+offset, by GTID, or (coprocessor variants) — timestamp-based dumping with a SinkFunction was never wired up. Hitting this means the parser was configured to start replication by timestamp using the legacy SinkFunction dump path.","triggerScenarios":"Calling MysqlConnection.dump(long, SinkFunction) directly, or configuring the parser so that findStartPosition resolves to a timestamp-only entry position and the dump dispatch selects the timestamp+SinkFunction overload.","commonSituations":"Setting canal.instance.master.timestamp (or an EntryPosition with only a timestamp and no journalName/position) while the MultiStageCoprocessor is disabled, forcing the SinkFunction-based dump code path. Custom ErosaConnection usage that calls the timestamp dump overload.","solutions":["Supply a concrete binlog filename + position (journalName + position) instead of a bare timestamp so the dump(String,Long,SinkFunction) path is used.","Enable GTID mode (canal.instance.gtidon=true) and provide a GTID set so dump(GTIDSet,...) is used.","If you actually need timestamp-based subscription, use the coprocessor path (MultiStageCoprocessor) — but note dump(long,MultiStageCoprocessor) at line 282 is ALSO unimplemented, so timestamp dumping is unsupported entirely; resolve to filename/position or GTID."],"exampleFix":"// before: timestamp-only position causes unimplemented dump\nmasterPosition = new EntryPosition();\nmasterPosition.setTimestamp(1690000000000L);\n// after: provide filename + position\nEntryPosition pos = new EntryPosition(\"mysql-bin.000001\", 4L);\npos.setTimestamp(1690000000000L);","handlingStrategy":"validation","validationCode":"// Before requesting a dump, ensure a timestamp-only start is never used\nEntryPosition pos = resolveStartPosition();\nif (pos.getJournalName() == null || pos.getJournalName().isEmpty()) {\n    if (pos.getGtid() == null) {\n        throw new IllegalArgumentException(\n            \"Timestamp-only start positions are unsupported by MysqlConnection.dump(long,SinkFunction). \" +\n            \"Provide a binlog filename+position or enable GTID.\");\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never configure canal to start by timestamp alone; always pair a timestamp with a journalName+position.","Prefer GTID-based start positions for robust resumption.","Unit-test your EntryPosition resolution to assert a non-empty journalName before the dump."],"tags":["mysql","binlog","unimplemented","dump","canal-parse"],"backgroundTag":null,"analyzedSha":"87be50e87686a3e8af08c368d0e1ffd1f59eb04a","analyzedAt":"2026-08-14T04:30:11.918Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}