-
Notifications
You must be signed in to change notification settings - Fork 358
Give DurableObjectStorage reference to primary #3112
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
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.
1f9dbdd
to
c24ddff
Compare
c24ddff
to
b42c3ed
Compare
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]>
b42c3ed
to
37cf21c
Compare
FYI, this build was merged with CI failing. It was an "optional" CI build, but the failure was in fact caused by this change and so should have been considered blocking. |
No description provided.