Open easokol opened 7 months ago
Describe the Bug Unable to perform migrations on Cassandra multiple hosts cluster
Steps to Reproduce Steps to reproduce the behavior:
replica1
replica2
replica3
migrate -verbose -path=migrations -database "cassandra://replica1:9042,replica2:9042,replica3:9042/base?consistency=ALL" up
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 https://github.com/gocql/gocql/issues/1509 But seems to be Migrate does not correctly support multiple hosts, they should be split to multiple args while call gocql.NewCluster() https://github.com/golang-migrate/migrate/blob/87ba13c3985dc5fceb0c30c08f371259d2623b43/database/cassandra/cassandra.go#L97
gocql.NewCluster()
are the hosts reachable? works fine for me.
Describe the Bug Unable to perform migrations on Cassandra multiple hosts cluster
Steps to Reproduce Steps to reproduce the behavior:
replica1
,replica2
,replica3
, hosts can be resolved and reached correctly.migrate -verbose -path=migrations -database "cassandra://replica1:9042,replica2:9042,replica3:9042/base?consistency=ALL" up
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 https://github.com/gocql/gocql/issues/1509 But seems to be Migrate does not correctly support multiple hosts, they should be split to multiple args while call
gocql.NewCluster()
https://github.com/golang-migrate/migrate/blob/87ba13c3985dc5fceb0c30c08f371259d2623b43/database/cassandra/cassandra.go#L97