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

kvtenant: expose reader status via connector #130115

Merged
merged 1 commit into from
Sep 6, 2024

Conversation

dt
Copy link
Member

@dt dt commented Sep 4, 2024

Tracking if a tenant is intended to be a reader of another tenant in the tenant record allows the system tenant to expose a new API in the tenant connector so that if a tenant intended to be a reader tenant calls the API, it can be informed of the tenant from which it should read and the timestamp -- fetched from the system tenant's PCR job for now -- at which it should do so. Actually configuring itself to be a reader and do so at that timestamp is left to the reader tenant's own devices, and is not included here; this change only adds the metadata to the tenant record and the API exposed to the tenant for fetching it.

Release note: none.
Epic: none.

@dt dt requested review from a team as code owners September 4, 2024 21:06
@dt dt requested review from xinhaoz and removed request for a team September 4, 2024 21:06
Copy link

blathers-crl bot commented Sep 4, 2024

It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR?

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@dt dt requested a review from azhu-crl September 4, 2024 21:06
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Collaborator

@msbutler msbutler left a comment

Choose a reason for hiding this comment

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

er, my b, approved wrong pr.

@msbutler msbutler self-requested a review September 4, 2024 22:21
@dt dt changed the title kvtenant: add reader status to tenant info, expose via connector kvtenant: expose reader status via connector Sep 4, 2024
@dt dt force-pushed the tenant-readfrom-metadata branch 3 times, most recently from b2b7505 to 331f107 Compare September 5, 2024 00:27
This adds a new API in the tenant connector to expose to a tenant if it is expected
to be a reader tenant and if so, of which tenant and as of what time.

 Actually configuring itself to be a reader and do so at that timestamp is left
to the reader tenant's own devices, and is not included here; this change only adds the
metadata to the tenant record and the API exposed to the tenant for fetching it.

Release note: none.
Epic: none.
@dt
Copy link
Member Author

dt commented Sep 5, 2024

TFTR!

bors r+

@msbutler
Copy link
Collaborator

msbutler commented Sep 6, 2024

seems that bors crashed and didn't send an error back. going to try this again.

@msbutler
Copy link
Collaborator

msbutler commented Sep 6, 2024

bors r-

@msbutler
Copy link
Collaborator

msbutler commented Sep 6, 2024

bors r+

craig bot pushed a commit that referenced this pull request Sep 6, 2024
130115: kvtenant: expose reader status  via connector r=msbutler a=dt

Tracking if a tenant is intended to be a reader of another tenant in the tenant record allows the system tenant to expose a new API in the tenant connector so that if a tenant intended to be a reader tenant calls the API, it can be informed of the tenant from which it should read and the timestamp -- fetched from the system tenant's PCR job for now -- at which it should do so. Actually configuring itself to be a reader and do so at that timestamp is left to the reader tenant's own devices, and is not included here; this change only adds the metadata to the tenant record and the API exposed to the tenant for fetching it.

Release note: none.
Epic: none.

Co-authored-by: David Taylor <tinystatemachine@gmail.com>
@craig
Copy link
Contributor

craig bot commented Sep 6, 2024

Build failed:

@msbutler
Copy link
Collaborator

msbutler commented Sep 6, 2024

Unrelated flake

bors r+

@craig craig bot merged commit 50c5280 into cockroachdb:master Sep 6, 2024
23 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.

3 participants