-
Notifications
You must be signed in to change notification settings - Fork 304
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
Give DurableObjectStorage reference to primary #3112
base: main
Are you sure you want to change the base?
Conversation
11c21c1
to
1f9dbdd
Compare
@justin-mp alright if I consolidate to 1 commit and mark you as a co-author? |
Fine with me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but please squash the 2 commits and clean up the files in src/workerd/io since I don't think we need any of those changes.
We give a replica DO access to its primary through a DurableObject stub. This is a pretty big departure from our typical stub creation flow. Usually we need to make an ActorChannel with an outgoing factory, which needs to make an outgoing request (internally) to get a capability to the receiving Durable Object. In this case, we already have our capability to the primary Durable Object once the ActorCacheInterface is up and running. Therefore, all we need to do is create an ActorChannel and give it access to the ActorCacheInterface, which will take care of the rest (internally). Co-authored-by: Justin Mazzola Paluska <[email protected]>
1f9dbdd
to
c24ddff
Compare
No description provided.