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

[Miniflare] miniflare.setOptions removes alarm from storage in v3 #2927

Open
SamyPesse opened this issue Jul 19, 2023 · 4 comments
Open

[Miniflare] miniflare.setOptions removes alarm from storage in v3 #2927

SamyPesse opened this issue Jul 19, 2023 · 4 comments

Comments

@SamyPesse
Copy link

We observed that calling miniflare.setOptions on a worker where a durable object had an alarm set (using state.storage.setAlarm), removes it and state.storage.getAlarm returns null after the DO has been reinitialized.

@SamyPesse SamyPesse changed the title miniflare.setOptions removes alarm from storage miniflare.setOptions removes alarm from storage in v3 Jul 19, 2023
@mrbbot
Copy link
Contributor

mrbbot commented Jul 20, 2023

Hey! 👋 Thanks for raising for this. workerd doesn't support persisting alarms to disk yet (#605 (comment)), so they'll get cleared whenever you restart workerd (new Miniflare()/Miniflare#setOptions()). Would you be able to explain your use case here? This is something we could potentially add...

@SamyPesse
Copy link
Author

We use setOptions to simulate a durable object being reset (and its memory reset). It helps ensures we don't write logic that depends on the memory when it should be reliable to restarts.

@mrbbot mrbbot changed the title miniflare.setOptions removes alarm from storage in v3 [Miniflare] miniflare.setOptions removes alarm from storage in v3 Nov 7, 2023
@mrbbot
Copy link
Contributor

mrbbot commented Nov 7, 2023

Hey! 👋 I'm going to transfer this to workers-sdk as that's the new home for Miniflare 3, and that will make it easier for us to track this. 👍

@mrbbot mrbbot transferred this issue from cloudflare/miniflare Nov 7, 2023
@penalosa penalosa transferred this issue from cloudflare/workers-sdk Oct 15, 2024
@penalosa
Copy link
Collaborator

Transferring this to workerd since I think the right solution here will probably involve workerd persisting alarms to disk along with durable object storage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

3 participants