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

feat(swingset): allow slow deletion of terminated vats #9227

Merged
merged 1 commit into from
Aug 13, 2024

Commits on Aug 12, 2024

  1. feat(swingset): allow slow termination/deletion of vats

    This introduces new `runPolicy()` controls which enable "slow
    termination" of vats. When configured, terminated vats are immediately
    dead (all promises are rejected, all new messages go splat, they never
    run again), however the vat's state is deleted slowly, one piece at a
    time. This makes it safe to terminate large vats, with a long history,
    lots of c-list imports/exports, or large vatstore tables, without fear
    of causing an overload (by e.g. dropping 100k references all in a
    single crank).
    
    See docs/run-policy.md for details and configuration instructions.
    
    The kernelKeeper is upgraded from v1 to v2, to add a new
    'vats.terminated' key, which tracks the vats that have been terminated
    but not yet completely deleted. NOTE: deployed applications must use
    `upgradeSwingset()` when using this kernel version for the first time.
    
    Also refactor vatKeeper.deleteSnapshotsAndTranscripts() into two
    separate methods, to fix a bug that hid in the combination: if the
    snapshot deletion phase exhausted our budget, we'd call
    deleteVatTranscripts() with a budget of 0, which was interpreted as
    "unlimited", and deleted all the transcript spans in a single burst.
    
    refs #8928
    
    Co-authored-by: Richard Gibson <richard.gibson@gmail.com>
    warner and gibson042 committed Aug 12, 2024
    Configuration menu
    Copy the full SHA
    9ac2ef0 View commit details
    Browse the repository at this point in the history