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

fix(swingset): delete unused snapshots #3505

Merged
merged 23 commits into from
Jul 29, 2021
Merged

fix(swingset): delete unused snapshots #3505

merged 23 commits into from
Jul 29, 2021

Commits on Jul 29, 2021

  1. Configuration menu
    Copy the full SHA
    446a39c View commit details
    Browse the repository at this point in the history
  2. refactor(swingset): move c.shutdown to caller of runSteps

    runSteps didn't create it; its caller still has a reference
    dckc committed Jul 29, 2021
    Configuration menu
    Copy the full SHA
    accec6a View commit details
    Browse the repository at this point in the history
  3. fix(swingset): delete unused snapshots

    In addition to maintaining a mapping from vatID to snapshotID,
    vatKeeper maintains a reverse mapping.
    
    After `commitCrank()`, the kernel calls `vatWarehouse.pruneSnapshots()`,
    which
     1. calls `kernelKeeper.getUnusedSnapshots()`,
     2. tries to `snapStore.delete()` each of them, and
     3. reports the results using `kernelKeeper.forgetUnusedSnapshots()`.
    
    fixes #3374
    dckc committed Jul 29, 2021
    Configuration menu
    Copy the full SHA
    aaa84e3 View commit details
    Browse the repository at this point in the history
  4. feat(swingset): configurable snapshotPruneInterval (=20)

    Pruning snapshots involves an O(n) query on the DB, so
    doing it on every crank seems expensive.
    
    refs #3374
    dckc committed Jul 29, 2021
    Configuration menu
    Copy the full SHA
    5e71fc0 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    8984761 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    479a264 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    7b0a4b0 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    f1bc8f7 View commit details
    Browse the repository at this point in the history
  9. chore(swingset): host commit() deletes snapshots

     - makeSnapStoreIO is in swing-store-lmdb now
     - vatKeeper.saveSnapshot() prepares deletes
       - removeFromSnapshot() returns consumers.length
       - no more vatWarehouse.pruneSnapshots
         - no more snapshotPruneInterval
     - test-warehouse: use commit()
     - test-reload-snapshot: update imports
    dckc committed Jul 29, 2021
    Configuration menu
    Copy the full SHA
    a5e23a2 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    9c48c70 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    f0493e5 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    8eddd61 View commit details
    Browse the repository at this point in the history
  13. refactor(swingset): static type for kvStore in vatKeeper

     - getRequired() asserts that get() does not return undefined
     - fix addHelpers() return type by declaring arg type
     - where kvStore.get() is ensured by getKeys() or has(),
       mark the alternative with assert.fail().
    dckc committed Jul 29, 2021
    Configuration menu
    Copy the full SHA
    6991266 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    561ec00 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    1578a5d View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    3369f2e View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    87ce0c1 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    6f34be9 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    e1f0150 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    0d5504b View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    ce67061 View commit details
    Browse the repository at this point in the history
  22. test: move xsnap/snapstore integration test to solo

    to avoid @agoric/xsnap in swing-store-lmdb devDependencies
    dckc committed Jul 29, 2021
    Configuration menu
    Copy the full SHA
    21a7a91 View commit details
    Browse the repository at this point in the history
  23. test(snapstore): re-save between prepare and commit delete

    plus one more /etc/passwd test
    dckc committed Jul 29, 2021
    Configuration menu
    Copy the full SHA
    1b2050d View commit details
    Browse the repository at this point in the history