-
Notifications
You must be signed in to change notification settings - Fork 30
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
Refstats for internal Ref
refactoring
#453
Comments
One consideration is that there are valid-ish reasons for holding to an old cell after it has been persisted. E.g. a cell X is kept and used for some work but at some point it is persisted deep in a collection Y. It's not intuitive that one would have to retrieve the new "version" of X from the new version of Y returned by But based on today's discussion it doesn't sound like a problem, does it? Using the new version and discarding the old one is supposed to be an optimization that allows soft refs to kick in while improving subsequent writes (requirement for a peer). |
Yes, it should be fine to hold onto old refs, as long as you are careful about memory usage limits etc. Basically you only want to keep a (bounded+reasonable) number of direct refs around. |
Believe all this is now fixes in recent network / storage refactoring for |
Behavior looks different but the core issue about orthogonal persistency is still there. (.cell.ref.stat (.db.write (.db.write *state*)))
{:embedded 50581,:persisted 49972,:direct 52236,:stored 49972,:soft 0,:total 52236} |
Some ref stats for inspiration with the internal refactoring mentioned at today's meeting.
Using a genesis state:
Using a large vector of Longs:
Using a small vector:
The text was updated successfully, but these errors were encountered: