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

implement refcounts for virtualized data, drop unreachable Remotables #3149

Closed
warner opened this issue May 21, 2021 · 2 comments
Closed

implement refcounts for virtualized data, drop unreachable Remotables #3149

warner opened this issue May 21, 2021 · 2 comments
Assignees
Labels
enhancement New feature or request SwingSet package: SwingSet

Comments

@warner
Copy link
Member

warner commented May 21, 2021

What is the Problem Being Solved?

As mentioned in #3132 , a future task is to have the virtual object manager maintain refcounts of all the vrefs that appear inside the (offline) virtualized data. For vrefs that map to Remotables, the VOM retains a strong reference to the Remotable, to ensure that future unserialization can retrieve the object. However the current implementation has no way to ever remove a Remotable from this set.

This could occur because someone overwrites the last virtual-object state property that used to reference the Remotable, or because that virtual object itself became unreachable and got collected. It could also occur when a makeWeakStore() instance had an entry that referenced the Remotable, but that entry was .deleteed or overwritten, or because the entire WeakStore became unreachable and collected.

The task is to implement refcounts on the virtualized data, keep track of what keeps the Remotable's vref alive, and react to that refcount dropping to zero

A closely related task is to use those same refcounts to delete virtualized data, when the corresponding vref is no longer referenced by any other virtualized data, nor are there any live Representatives for it.

Both of these tasks are safe to defer for a while, because we aren't putting very much data in these virtualized structures, and so far the only use case is one Brand per Issuer, which is held strongly by the vat anyways.

refs #3106 but is out of scope (deferred for a later phase)

@warner
Copy link
Member Author

warner commented Jul 23, 2021

@FUDCo this is either equal to, or adjacent to, the VOM-GC work you're doing now.

@FUDCo
Copy link
Contributor

FUDCo commented Oct 15, 2021

closed by #3732

@FUDCo FUDCo closed this as completed Oct 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request SwingSet package: SwingSet
Projects
None yet
Development

No branches or pull requests

2 participants