Skip to content

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

Merged
craig[bot] merged 2 commits intocockroachdb:masterfrom
jaylim-crl:jay/directory-cache-interface
Mar 23, 2022
Merged

ccl/sqlproxyccl: rename tenant.Resolver to tenant.DirectoryCache #78276
craig[bot] merged 2 commits intocockroachdb:masterfrom
jaylim-crl:jay/directory-cache-interface

Conversation

@jaylim-crl
Copy link
Copy Markdown
Contributor

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
Copy Markdown
Member

This change is Reviewable

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor Author

TFTR!

bors r=JeffSwenson,andy-kimball

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Mar 23, 2022

Build failed (retrying...):

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Mar 23, 2022

Build failed (retrying...):

@craig
Copy link
Copy Markdown
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
Copy Markdown
Contributor 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