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

UPSTREAM: <carry>: assign shard names to objects #100

Conversation

p0lyn0mial
Copy link

This PR applies a shard name to objects.
This is necessary because we don't store the shard name in the objects in the db.
Instead, we need to derive it from the storage key, and then applied after retrieving the object from storage.

Assigning the names is required to:

  • enable the watch-cache for the cache server
  • instruct the internal kube-controllers how to construct the final URL

Copy link

@stevekuznetsov stevekuznetsov left a comment

Choose a reason for hiding this comment

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

nit: if we use some struct here to hold our options, I think the rebase cost might be smaller - WDYT?

question: do you need to store the RV of the object on the owning shard here?

@p0lyn0mial
Copy link
Author

nit: if we use some struct here to hold our options, I think the rebase cost might be smaller - WDYT?

I can try to open a new PR for it

question: do you need to store the RV of the object on the owning shard here?

not now but in the future, I think it will be needed.

@sttts
Copy link
Member

sttts commented Sep 9, 2022

/lgtm
/approve

@sttts sttts merged commit 01e2c80 into kcp-dev:feature-logical-clusters-1.24 Sep 9, 2022
@stevekuznetsov
Copy link

kcp-dev/kcp#342

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