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

Followup #34

Merged
merged 2 commits into from
Jun 16, 2020
Merged

Followup #34

merged 2 commits into from
Jun 16, 2020

Conversation

arv
Copy link
Contributor

@arv arv commented Jun 16, 2020

No description provided.

arv added 2 commits June 16, 2020 10:14
The rc in the root was causing reformat churn
@vercel
Copy link

vercel bot commented Jun 16, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/rocicorp/replicache-sdk-js/kttkccrus
✅ Preview: https://replicache-sdk-js-git-fork-arv-followup.rocicorp.vercel.app

@vercel vercel bot temporarily deployed to Preview June 16, 2020 17:15 Inactive
@arv arv merged commit 9f6f349 into rocicorp:master Jun 16, 2020
@arv arv deleted the followup branch June 16, 2020 17:17
aboodman pushed a commit that referenced this pull request Oct 28, 2021
We use ref counting to implement garbage collection. This is done at the
`dag::Write` layer. We do the garbage collection in `dag::Write::commit`.

- A head keeps a chunk alive.
- A ref from one alive chunk to another chunk keeps the other chunk
  alive.

When we call `set_head` we record the new and old hash so that we can
increment and decrement the ref counts later in `commit`.

When we call `put_chunk` we record the hash so that we can check for
orphaned chunks in `commit`.

Fixes #34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant