Skip to content

Re-connecting to Cassandra after recovering #917

@lakshmankollipara

Description

@lakshmankollipara

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions