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

ccl/sqlproxyccl: rename tenant.Resolver to tenant.DirectoryCache #78276

Merged
merged 2 commits into from
Mar 23, 2022

Conversation

jaylim-crl
Copy link
Collaborator

Informs #76000.

ccl/sqlproxyccl: move the TenantResolver interface to the tenant package

Previously, the TenantResolver interface lived in the base sqlproxyccl package,
and there was no way to enforce that the tenant.Directory struct implements
this interface since that would result in a cyclic dependency. This commit
moves the TenantResolver interface into the tenant package, and enforced that
the tenant.Directory struct implements that.

This would then allow us to rename the tenant.Directory struct to
tenant.directoryCache, and the tenant.Resolver interface to
tenant.DirectoryCache.

Release note: None

ccl/sqlproxyccl: rename tenant.Resolver to tenant.DirectoryCache

This commit renames the tenant.Resolver interface to tenant.DirectoryCache.
The existing Directory struct was also renamed to directoryCache to prevent
confusions since there were previously two definitions of a "directory": one
pointing to the cache of entries, whereas another referring to the actual
directory server.

Release note: None

Previously, the TenantResolver interface lived in the base sqlproxyccl package,
and there was no way to enforce that the tenant.Directory struct implements
this interface since that would result in a cyclic dependency. This commit
moves the TenantResolver interface into the tenant package, and enforced that
the tenant.Directory struct implements that.

This would then allow us to rename the tenant.Directory struct to
tenant.directoryCache, and the tenant.Resolver interface to
tenant.DirectoryCache.

Release note: None
This commit renames the tenant.Resolver interface to tenant.DirectoryCache.
The existing Directory struct was also renamed to directoryCache to prevent
confusions since there were previously two definitions of a "directory": one
pointing to the cache of entries, whereas another referring to the actual
directory server.

Release note: None
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Collaborator

@jeffswenson jeffswenson left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@andy-kimball andy-kimball left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained

@jaylim-crl
Copy link
Collaborator Author

TFTR!

bors r=JeffSwenson,andy-kimball

@craig
Copy link
Contributor

craig bot commented Mar 23, 2022

Build failed (retrying...):

@craig
Copy link
Contributor

craig bot commented Mar 23, 2022

Build failed (retrying...):

@craig
Copy link
Contributor

craig bot commented Mar 23, 2022

Build succeeded:

@craig craig bot merged commit 5bd50f5 into cockroachdb:master Mar 23, 2022
@jaylim-crl jaylim-crl deleted the jay/directory-cache-interface branch March 23, 2022 20:49
@jaylim-crl
Copy link
Collaborator Author

blathers backport 22.1

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.

4 participants