Skip to content

Commit

Permalink
Detailed description for NumConns.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
OleksiienkoMykyta authored and joao-r-reis committed Nov 22, 2024
1 parent c34640d commit 280f0aa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Remove global NewBatch function (CASSGO-15)

- Detailed description for NumConns (CASSGO-3)

### Fixed

- Retry policy now takes into account query idempotency (CASSGO-27)
Expand Down
8 changes: 7 additions & 1 deletion cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,13 @@ type ClusterConfig struct {
// Initial keyspace. Optional.
Keyspace string

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

Expand Down

0 comments on commit 280f0aa

Please sign in to comment.