Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cassandra multiple hosts cluster migrations failed #1071

Open
easokol opened this issue Apr 11, 2024 · 0 comments
Open

Cassandra multiple hosts cluster migrations failed #1071

easokol opened this issue Apr 11, 2024 · 0 comments

Comments

@easokol
Copy link

easokol commented Apr 11, 2024

Describe the Bug
Unable to perform migrations on Cassandra multiple hosts cluster

Steps to Reproduce
Steps to reproduce the behavior:

  1. Assume we have Cassandra cluster with 3 replicas replica1,replica2,replica3, hosts can be resolved and reached correctly.
  2. migrate -verbose -path=migrations -database "cassandra://replica1:9042,replica2:9042,replica3:9042/base?consistency=ALL" up
  3. See error error: gocql: unable to create session: failed to resolve any of the provided hostnames

Expected Behavior
Migrations successful as with PostgreSQL, MongoDB, etc

Migrate Version
4.17.0

Loaded Source Drivers
Source drivers: bitbucket, gitlab, godoc-vfs, s3, gcs, go-bindata, file, github, github-ee

Loaded Database Drivers
Database drivers: stub, clickhouse, cassandra, mysql, pgx4, crdb-postgres, firebird, pgx5, cockroach, cockroachdb, mongodb+srv, sqlserver, spanner, pgx, postgres, yugabyte, rqlite, mongodb, firebirdsql, postgresql, redshift, yugabytedb, ysql, neo4j

Additional context
There is issue with gocql gocql/gocql#1509
But seems to be Migrate does not correctly support multiple hosts, they should be split to multiple args while call gocql.NewCluster()

cluster := gocql.NewCluster(u.Host)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant