phantom icon indicating copy to clipboard operation
phantom copied to clipboard

Re-connecting to Cassandra after recovering

Open lakshmankollipara opened this issue 5 years ago • 0 comments

With Scala Verison 2.13.1 and Phantom version 2.59.0

The Phantom driver is failing to re-connect after my Cassandra goes down and re-covers after some time.

This is how my Cluster Builder looks like:

    ContactPoints(hosts).withClusterBuilder(
      _.withCredentials("cassandra", "cassandra")
        .withPort(9042)
        .withProtocolVersion(ProtocolVersion.V4)
    ).noHeartbeat().keySpace(
      KeySpace(keyspace).ifNotExists().`with`(
        replication eqs SimpleStrategy.replication_factor(1)

      )
    )

Steps to Reproduce:

  1. Spin-down Cassandra
  2. Run the application and ensure that the application throws com.datastax.driver.core.exceptions.NoHostAvailableException
  3. Bring-up Cassandra and ensure Keyspace is ready
  4. trigger the Application to make a DB call.
  5. Expected to see that phantom connection is successful. But, the service still throws NoHostAvailableException exception

lakshmankollipara avatar Oct 06 '20 22:10 lakshmankollipara