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

Give DurableObjectStorage reference to primary #3112

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

MellowYarker
Copy link
Contributor

No description provided.

@MellowYarker MellowYarker force-pushed the jmp/context-storage-primary-property branch 2 times, most recently from 11c21c1 to 1f9dbdd Compare November 19, 2024 02:30
@MellowYarker MellowYarker changed the title Jmp/context storage primary property Give DurableObjectStorage reference to primary Nov 19, 2024
@MellowYarker MellowYarker marked this pull request as ready for review November 19, 2024 21:22
@MellowYarker MellowYarker requested review from a team as code owners November 19, 2024 21:22
@MellowYarker
Copy link
Contributor Author

@justin-mp alright if I consolidate to 1 commit and mark you as a co-author?

@justin-mp
Copy link
Contributor

@justin-mp alright if I consolidate to 1 commit and mark you as a co-author?

Fine with me.

@jasnell
Copy link
Member

jasnell commented Nov 20, 2024

A PR so nice I approved it thrice.

image

Really not sure what happened here, Github.

Copy link
Contributor

@justin-mp justin-mp left a 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.

src/workerd/api/actor-state.h Outdated Show resolved Hide resolved
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]>
@MellowYarker MellowYarker force-pushed the jmp/context-storage-primary-property branch from 1f9dbdd to c24ddff Compare November 20, 2024 21:58
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