Skip to content
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

Merged
merged 1 commit into from
Feb 21, 2025

Conversation

sylwiaszunejko
Copy link
Collaborator

Fixes: #395

@sylwiaszunejko sylwiaszunejko self-assigned this Feb 20, 2025
Copy link
Collaborator

@dkropachev dkropachev left a 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

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{}
Copy link
Collaborator

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

@dkropachev dkropachev merged commit b631024 into scylladb:master Feb 21, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix test cases with tablets and without
2 participants