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

Repository expiration on storage server #122

Closed
Tracked by #108
madadam opened this issue May 25, 2023 · 1 comment
Closed
Tracked by #108

Repository expiration on storage server #122

madadam opened this issue May 25, 2023 · 1 comment
Labels

Comments

@madadam
Copy link
Collaborator

madadam commented May 25, 2023

Repositories on the storage servers should expire after some time (say 24 hours). This is for two reasons:

  1. The storage space is limited and this service is currently available to everyone free of charge so this way we ensure the available space lasts longer
  2. To comply with various privacy regulations, right-to-be-forgotten, etc...

Proposal

We expire the repository when it's not being used (read from or written to) for the given time period ("expiration time"). When a repo is expired we only delete its data but we keep the db around so the repo can be easily restored if it becomes used again.

Implementation details

When a repo is expired we delete all the data (blocks and index) except the root nodes. We mark the root nodes as Expired but we keep the block presence intact. We process incoming RootNode messages normally. We also send outgoing RootNode messages normally. When we receive a ChildNode request for any of the expired root node, we respond with ChildNodesError but we also flip the expired node to Incomplete so we start to sync that branch again.

@madadam madadam mentioned this issue May 25, 2023
9 tasks
@madadam madadam assigned madadam and unassigned madadam May 26, 2023
@madadam madadam added the server label Jun 29, 2023
@inetic
Copy link
Member

inetic commented Oct 24, 2023

This was implemented somewhere around this commit 0bd588b

@inetic inetic closed this as completed Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants