zendesk / maxwell

Maxwell's daemon, a mysql-to-json kafka producer
https://maxwells-daemon.io/
Other
4.03k stars 1.01k forks source link

open-replicator bug #590

Closed worldup closed 6 years ago

worldup commented 7 years ago

hi, when i run maxwell on prod environment ,it throws an exception 10:32:24,875 INFO OpenReplicator - starting replication at mysql-bin.002881:218389173 10:32:26,068 WARN MaxwellReplicator - open-replicator stopped at position mysql-bin.002881:218398245 -- restarting java.lang.NullPointerException at com.google.code.or.OpenReplicator.setupChecksumState(OpenReplicator.java:276) at com.google.code.or.OpenReplicator.start(OpenReplicator.java:112) at com.zendesk.maxwell.replication.MaxwellReplicator.ensureReplicatorThread(MaxwellReplicator.java:112) at com.zendesk.maxwell.replication.MaxwellReplicator.getRow(MaxwellReplicator.java:322) at com.zendesk.maxwell.replication.AbstractReplicator.work(AbstractReplicator.java:127) at com.zendesk.maxwell.util.RunLoopProcess.runLoop(RunLoopProcess.java:35) at com.zendesk.maxwell.Maxwell.start(Maxwell.java:182) at com.zendesk.maxwell.Maxwell.main(Maxwell.java:203) 10:32:26,082 INFO Maxwell - starting shutdown

when i see the OpenRelicator source code at 276 if(cols!=null && cols.get(0).equals("CRC32") || cols.get(0).equals("NONE")) actually ,its a bug .cols.get(0) may be null.

nvartolomei commented 7 years ago

the good old java code conventions "CRC32".equals(cols.get(0)) instead of cols.get(0).equals("CRC32")

osheroff commented 7 years ago

i'm slightly late here. what eversion of mysql are you running against?

worldup commented 7 years ago

mysql 5.6.35

osheroff commented 7 years ago

Odd that MySQL is returning null here. Ok can you open a PR?

osheroff commented 6 years ago

open-replicator is a deprecated code path now, closing