Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Periodically refresh cassandra clusters topology #47
lua-cassandra doesn't automatically detect changes in the ring topology. You have to manually call cluster:refresh() for it to pick up any change. This is a problem when we're replacing nodes in the C* cluster since the driver will keep trying to connect to the old ones and ignore any new host.
With this change we call refresh() even N seconds, always after the response has been returned.
@drolando Correct, lua-cassandra does not listen for cluster topology events as of today (although contributions would be welcome).
However, I am not sure that
Have you given a try to your patch in an environment receiving traffic while swapping C* nodes at the same time?