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

Add initial implementation of cleanup logic when a Sandbox is evicted #8467

Merged
merged 1 commit into from Sep 12, 2023

Commits on Sep 12, 2023

  1. Add initial implementation of cleanup logic when a Sandbox is evicted

    Previously, when a Sandbox was evicted from SandboxManager, there was no logic
    to shut down any of the associated resources. There was an implicit assumption
    that the Sandbox would be garbage collected, and cleanup would magically occur,
    but currently there are a lot of things preventing Sandbox GC from occurring,
    and there are a lot of resources that need to be explicitly cleaned up.
    
    Add a 'shutdown' method to Sandbox that closes the classloader and shuts down
    the main executor thread. Although this is not currently sufficient to make the
    Sandbox eligible for GC, it does free some resources.
    
    Forthcoming CLs will add additional cleanup logic, with the eventual goal of
    making Sandboxes eligible for GC when they are evicted from SandboxManager.
    
    PiperOrigin-RevId: 564790888
    hoisie authored and Copybara-Service committed Sep 12, 2023
    Configuration menu
    Copy the full SHA
    c087df1 View commit details
    Browse the repository at this point in the history