Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(swingset): don't assume we can cache GC actions in processRefcounts
Previously, processRefcounts() populated a local RAM cache upon entry with getGCActions(), added things to it during operation, then saved it with setGCActions() at the end. The intention was to avoid lots of redundant kvStore gets/sets as we loop over a (potentially large) number of changes. But, this approach would lose actions if we called other functions in the middle which did their own additions (eg with addGCActions). Since we only add actions, never remove them, it's just as fast (and infinitely less buggy) to accumulate a RAM cache of *new* actions, and add them all at the end, with addGCActions(). We don't make calls in the middle yet, but upcoming changes might start doing that, so best to fix this bug now. closes #5054
- Loading branch information