ClickHouse / clickhouse-go

Golang driver for ClickHouse
Apache License 2.0
2.88k stars 553 forks source link

Reintroduce the random connection strategy #1313

Closed larry-cdn77 closed 4 months ago

larry-cdn77 commented 4 months ago

Referring to https://github.com/ClickHouse/clickhouse-go/discussions/1302

I chose the name 'random' for the connection strategy like it was called in v1 but maybe 'randomised' would be more accurate?

Grouped test code of the three connection strategies (in-order, round-robin and random) in order to avoid three copies of the same

Tested with CLICKHOUSE_USE_DOCKER=false