This is an automated email from the ASF dual-hosted git repository.
joaoreis pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra-gocql-driver.git
The following commit(s) were added to refs/heads/trunk by this push:
new 280f0aa Detailed description for NumConns.
280f0aa is described below
commit 280f0aa2e7477c193b4c5d0e9f3961e4f86ecb56
Author: mykyta.oleksiienko <[email protected]>
AuthorDate: Thu Sep 12 17:44:07 2024 +0300
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
---
CHANGELOG.md | 2 ++
cluster.go | 8 +++++++-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a83e6f8..6bc24d4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -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)
diff --git a/cluster.go b/cluster.go
index 13e62f3..413695c 100644
--- a/cluster.go
+++ b/cluster.go
@@ -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
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]