-
Notifications
You must be signed in to change notification settings - Fork 16.7k
DO: document deleteAll() now deletes alarms #28515
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
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
e32a342
DO: document deleteAll() now deletes alarms
vy-ton 7b0331d
Update 2026-02-24-deleteall-deletes-alarms.mdx
vy-ton 3281008
Update src/content/partials/durable-objects/api-storage-other-methods…
vy-ton 6d4b640
Update src/content/docs/durable-objects/best-practices/rules-of-durab…
vy-ton 8065e23
Update src/content/changelog/durable-objects/2026-02-24-deleteall-del…
vy-ton 7c4e3df
Use singular "alarm" in changelog
ask-bonk[bot] c89df53
Update src/content/partials/durable-objects/api-storage-other-methods…
Oxyjun File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
src/content/changelog/durable-objects/2026-02-24-deleteall-deletes-alarms.mdx
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| --- | ||
| title: deleteAll() now deletes Durable Object alarm | ||
| description: Clean up a Durable Object's storage with a single API call. | ||
| products: | ||
| - durable-objects | ||
| - workers | ||
| date: 2026-02-24 | ||
| --- | ||
|
|
||
| `deleteAll()` now deletes a Durable Object alarm in addition to stored data for Workers with a compatibility date of `2026-02-24` or later. This change simplifies clearing a Durable Object's storage with a single API call. | ||
|
|
||
| Previously, `deleteAll()` only deleted user-stored data for an object. Alarm usage stores metadata in an object's storage, which required a separate `deleteAlarm()` call to fully clean up all storage for an object. The `deleteAll()` change applies to both KV-backed and SQLite-backed Durable Objects. | ||
|
|
||
| ```js | ||
| // Before: two API calls required to clear all storage | ||
| await this.ctx.storage.deleteAlarm(); | ||
| await this.ctx.storage.deleteAll(); | ||
|
|
||
| // Now: a single call clears both data and the alarm | ||
| await this.ctx.storage.deleteAll(); | ||
| ``` | ||
|
|
||
| For more information, refer to the [Storage API documentation](/durable-objects/api/sqlite-storage-api/#deleteall). | ||
14 changes: 14 additions & 0 deletions
14
src/content/compatibility-flags/delete-all-deletes-alarm.md
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| --- | ||
| _build: | ||
| publishResources: false | ||
| render: never | ||
| list: never | ||
|
|
||
| name: "Durable Object `deleteAll()` deletes alarms" | ||
| sort_date: "2026-02-24" | ||
| enable_date: "2026-02-24" | ||
| enable_flag: "delete_all_deletes_alarm" | ||
| disable_flag: "delete_all_preserves_alarm" | ||
| --- | ||
|
|
||
| With the `delete_all_deletes_alarm` flag set, calling `deleteAll()` on a Durable Object's storage will delete any active alarm in addition to all stored data. Previously, `deleteAll()` only deleted user-stored data, and alarms required a separate `deleteAlarm()` call to remove. This change applies to both KV-backed and SQLite-backed Durable Objects. |
This file contains hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Minor: the title uses singular "alarm" but the rest of the PR (compatibility flag description, partial) uses plural "alarms". Consider pluralizing for consistency, since a Durable Object can have an active alarm that
deleteAll()will delete.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.
/bonk Changelog should use singular "alarm" everywhere