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

improve slow-deletion runPolicy cleanup budget API #9880

Merged
merged 2 commits into from
Aug 16, 2024

Conversation

warner
Copy link
Member

@warner warner commented Aug 12, 2024

This improves the runPolicy APIs that control slow vat deletion (runPolicy.allowCleanup()), and the reporting of cleanup results (.didCleanup()). The new API allows individual phases to get different budgets, so e.g. we can restrict the expensive exports and imports phases to 5 deletions per run, while letting the cheaper kv phase to do 50 per run, so overall deletion happens faster. Experiments show this should allow our old large price-feed vats to be deleted in about 5 months, rather than 6 years.

The swing-store deletion calls (snapStore.deleteVatSnapshots(budget) and transcriptStore.deleteVatTranscripts(budget)) were changed to accept budget = Infinity, and use Infinity as a default, to allow swingset to use Infinity in policies. This seems less error-prone than using undefined to mean "unlimited".

See run-policy.md for the new API and examples of how a host application should use it.

refs #8928

@warner warner added SwingSet package: SwingSet swing-store labels Aug 12, 2024
@warner warner requested a review from gibson042 August 12, 2024 23:03
@warner warner self-assigned this Aug 12, 2024
Copy link

cloudflare-workers-and-pages bot commented Aug 12, 2024

Deploying agoric-sdk with  Cloudflare Pages  Cloudflare Pages

Latest commit: 8b93c2f
Status: ✅  Deploy successful!
Preview URL: https://9820fb07.agoric-sdk.pages.dev
Branch Preview URL: https://warner-8928-cleanup-budget.agoric-sdk.pages.dev

View logs

@warner warner force-pushed the warner/7212-retire-abandoned-unreachables branch 2 times, most recently from 6813383 to aa004f9 Compare August 13, 2024 00:50
@warner warner force-pushed the warner/7212-retire-abandoned-unreachables branch from aa004f9 to 2a10c9d Compare August 13, 2024 01:49
@warner warner force-pushed the warner/7212-retire-abandoned-unreachables branch from 2a10c9d to 9dcdabb Compare August 14, 2024 17:55
Base automatically changed from warner/7212-retire-abandoned-unreachables to master August 14, 2024 18:43
packages/SwingSet/docs/run-policy.md Outdated Show resolved Hide resolved
packages/SwingSet/docs/run-policy.md Outdated Show resolved Hide resolved
packages/SwingSet/src/kernel/kernel.js Outdated Show resolved Hide resolved
packages/SwingSet/src/types-external.js Outdated Show resolved Hide resolved
@warner warner added the automerge:rebase Automatically rebase updates, then merge label Aug 14, 2024
This will make life easier for the upcoming swingset change, where
`runPolicy.allowCleanups()` can return `{ default: Infinity }`.
@mergify mergify bot merged commit 279e654 into master Aug 16, 2024
80 checks passed
@mergify mergify bot deleted the warner/8928-cleanup-budget branch August 16, 2024 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge:rebase Automatically rebase updates, then merge swing-store SwingSet package: SwingSet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants