-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Call createKeyspace separately in both versions of createSessionFromCluster #398
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefere to change createSessionFromClusterHelper
so that it would accept testKeyspaceOpts
that has tablets: bool
and .getKeyspaceName() String
.
rename initOnce
to initKeyspaceOnce
make it map[string]synce.Once
where key is a keyspace name
b6bc8f0
to
93a49a4
Compare
93a49a4
to
0da5942
Compare
common_test.go
Outdated
@@ -56,7 +56,7 @@ func addSslOptions(cluster *ClusterConfig) *ClusterConfig { | |||
return cluster | |||
} | |||
|
|||
var initOnce sync.Once | |||
var initKeyspaceOnce = map[string]*sync.Once{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is going to have parallel access, so you need to have a mutex to guard it.
Please make an struct with method that pulls sync.Once from it
0da5942
to
a74f982
Compare
Fixes: #395