-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(cluster) better keyspace pooling
Taking advantage of the recent fix in the init module that pools sockets by their keyspace, this avoids setting a keyspace before each operation in order to allow for `coordinator_options` in `execute()` and `batch()`. Instead, we set coordinators their keyspace when opening their connection, as it should be. Cassandra keyspaces are expected to exist when we connect to it via a cluster instance, or else the connection will fail, as it should be. If no keyspace is set for the cluster, none will be used. If a keyspace is set at the `coordinator_options` argument (per-query level of granularity), then the cluster will set the keyspace beore spawning the coordinator, hence it will always use a different connection pool.
- Loading branch information
1 parent
a8dcd0b
commit b0329a3
Showing
4 changed files
with
89 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters