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

Make public interfaces implementable #184

Merged

Conversation

dkropachev
Copy link
Collaborator

currently private interface token directly or indirectly present in lot's of interfaces and therefore makes them unimplementable: SelectedHost, ExecutableQuery, HostSelectionPolicy, NextHost

To fix it we need to make all parts of interfaces be public
Closes #183

host_source.go Outdated
Comment on lines 438 to 441
h.mu.Lock()
defer h.mu.Unlock()
addr, _ := h.connectAddressLocked()
return net.JoinHostPort(addr.String(), strconv.Itoa(h.port))
h.mu.Lock()
defer h.mu.Unlock()
addr, _ := h.connectAddressLocked()
return net.JoinHostPort(addr.String(), strconv.Itoa(h.port))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not related to the PR

cache map[string]*KeyspaceMetadata
cache map[string]*KeyspaceMetadata
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not related to the PR

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

scylla.go Outdated

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As before

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

scylla.go Outdated
return c.streams.NumStreams / 2 > c.AvailableStreams();
return c.streams.NumStreams/2 > c.AvailableStreams()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not related to the PR

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

session.go Outdated
Comment on lines 2174 to 2177
indexes []int
types []TypeInfo
keyspace string
table string
indexes []int
types []TypeInfo
keyspace string
table string
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not related

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

@dkropachev dkropachev force-pushed the fix-broken-public-interfaces branch 2 times, most recently from 140013b to 30dc8d9 Compare June 3, 2024 08:15
@dkropachev dkropachev force-pushed the fix-broken-public-interfaces branch from 30dc8d9 to 5bdba32 Compare June 3, 2024 08:18
@dkropachev dkropachev force-pushed the fix-broken-public-interfaces branch 3 times, most recently from bd80d3f to 67c4a60 Compare June 4, 2024 14:35
currently private interface `token` directly or indirectly present in
lot's of interfaces and therefore makes them unimplementable:
`SelectedHost`, `ExecutableQuery`, `HostSelectionPolicy`, `NextHost`

To fix it we need to make all parts of interfaces be public
`ExecutableQuery` uses `partitioner` which makes it unimplementable
@dkropachev dkropachev force-pushed the fix-broken-public-interfaces branch from 67c4a60 to f0b3cef Compare June 5, 2024 15:18
@sylwiaszunejko sylwiaszunejko merged commit cd3f0e9 into scylladb:master Jun 6, 2024
1 check 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.

Recent changes made imposible to have custom implementations for common interfaces
2 participants