Skip to content

Commit 280f0aa

Browse files
OleksiienkoMykytajoao-r-reis
authored andcommitted
Detailed description for NumConns.
NumConns doesn`t have a proper description, so it could cause misunderstanding and confusion about this option. patch by Mykyta Oleksiienko; reviewed by Joao Reis and Jackson Fleming for CASSGO-3
1 parent c34640d commit 280f0aa

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1414

1515
- Remove global NewBatch function (CASSGO-15)
1616

17+
- Detailed description for NumConns (CASSGO-3)
18+
1719
### Fixed
1820

1921
- Retry policy now takes into account query idempotency (CASSGO-27)

cluster.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,13 @@ type ClusterConfig struct {
102102
// Initial keyspace. Optional.
103103
Keyspace string
104104

105-
// Number of connections per host.
105+
// The size of the connection pool for each host.
106+
// The pool filling runs in separate gourutine during the session initialization phase.
107+
// gocql will always try to get 1 connection on each host pool
108+
// during session initialization AND it will attempt
109+
// to fill each pool afterward asynchronously if NumConns > 1.
110+
// Notice: There is no guarantee that pool filling will be finished in the initialization phase.
111+
// Also, it describes a maximum number of connections at the same time.
106112
// Default: 2
107113
NumConns int
108114

0 commit comments

Comments
 (0)