scylladb / scylla-cdc-java

Apache License 2.0
24 stars 15 forks source link

NullPointerException when specifying a non-existing keyspace or table in either clusters (master or replica) #17

Closed kbr- closed 3 years ago

kbr- commented 3 years ago

The title says it all. For example, run:

java -cp replicator.jar com.scylladb.cdc.replicator.Main -k ks1 -t table1 -s 127.0.0.10 -d 127.0.0.20 -cl one -m delta

without previously creating ks1 or table1. Result:

Master thread failed: null                                                                                                                                    
java.lang.NullPointerException                                                                                                                                
        at com.scylladb.cdc.replicator.ReplicatorConsumer.<init>(ReplicatorConsumer.java:41)
        at com.scylladb.cdc.replicator.Main.lambda$startReplicator$0(Main.java:55)                                                                            
        at com.scylladb.cdc.lib.LocalTransport.configureWorkers(LocalTransport.java:79)       
        at com.scylladb.cdc.model.master.Master.run(Master.java:88)                                                                                           
        at com.scylladb.cdc.lib.MasterThread.run(MasterThread.java:32)                                                                                        
haaawk commented 3 years ago

What would be the expected behaviour? Stopping gracefully?

kbr- commented 3 years ago

Yes

avelanarius commented 3 years ago

Pushed a commit that fixes this exact issue. However, still no other validation is done. (for example whether the destination cluster has a correct schema).