-
Notifications
You must be signed in to change notification settings - Fork 753
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support
durableObjectsPersist
option (#517)
* Support `durableObjectsPersist` option Uses cloudflare/workerd#302 to enable Durable Object persistence. - `durableObjectsPersist: undefined | false | "memory:"` stores "in-memory" - `durableObjectsPersist: true` stores under `.mf` on the file-system - `durableObjectsPersist: "(file://)?<path>"` stores under `<path>` on the file-system Note Miniflare 2 persisted in-memory data between options reloads. In Miniflare 3, `workerd` restarts on every reload, so if we used `workerd`'s in-memory storage, we'd lose data every time options changed. To maintain Miniflare 2's behaviour, "in-memory" storage isn't actually in-memory. Instead, we write to a temporary directory and clean this up on `dispose()`/exit. 🙈 Also fixes a bug if multiple services bound to the same Durable Object class. This would result in duplicate entries in `durableObjectClassNames`. This has been changed from a `Map` of `string[]`s to a `Map` of `Set<string>`s to enforce the uniqueness constraint. Closes #2403 Closes #2458 Internal ticket: DEVX-219 * fixup! Support `durableObjectsPersist` option * fixup! Support `durableObjectsPersist` option * fixup! Support `durableObjectsPersist` option
- Loading branch information
Showing
11 changed files
with
350 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.