thibaultcha / lua-cassandra

Pure Lua driver for Apache Cassandra
https://thibaultcha.github.io/lua-cassandra
Other
98 stars 35 forks source link

fix(cluster) using default_port for peers addresses #49

Closed thibaultcha closed 8 years ago

thibaultcha commented 8 years ago

Clusters with nodes not running on the default 9042 port couldn't be properly reached. Thanks @allisthere2love for the investigation.

This issue was never encountered before and my guess is because such clusters added their contact_points including the port (x.x.x.x:9043), and the driver could connect to it, but not to the other nodes, since it was trying 9042 on those. So it simply considered the other nodes as DOWN, and thus still works (if one doesn't check the logs and those lags are not displaying warnings, it seems like nothing is going wrong). However @allisthere2love had nodes from another C* cluster listening on 9042, leading to inconsistencies and thus, actual errors that allowed us to track it down.

As per other datastax drivers, all nodes of a cluster must listen on the same port.

Fix thibaultCha/lua-cassandra#47 See Mashape/kong#1139

coveralls commented 8 years ago

Coverage Status

Coverage increased (+0.05%) to 88.446% when pulling 1f6668567e55bbb5489d21dd3fd6c10e1105bfc7 on hotfix/same-host-clusters into 9a7910b41085707b4120b1eb0e360fa1c61e055a on release/0.5.1.