Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(scyllaclient): don't panic on empty host in client
In case client was mistakenly initialized with "" host, getting host from the pool would panic: panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x11da5ac] goroutine 253 [running]: github.com/scylladb/scylla-manager/v3/pkg/scyllaclient.NewClient.hostPool.func3(0xc0004345a0) github.com/scylladb/scylla-manager/v3/pkg/scyllaclient/hostpool.go:32 +0xac This should be replaced with a simple error. This commit adds additional validation to client config, which prohibits specifying empty host there. It also makes host pool return an error instead of panic in case of invalid host pool response. Fixes scylladb/scylla-enterprise#4692
- Loading branch information