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

chore: don't delete own data when leaving a project #458

Merged
merged 1 commit into from
Feb 1, 2024

Conversation

EvanHahn
Copy link
Contributor

When you leave a project, we no longer delete your own data (but still
close your writer Hypercore).

Because this was the last occurrence of deleteOwn: false, I removed
the option entirely.

Fixes #449.

When you leave a project, we no longer delete your own data (but still
close your writer Hypercore).

Because this was the last occurrence of `deleteOwn: false`, I removed
the option entirely.

Fixes #449.
Copy link
Member

@achou11 achou11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

have a non-blocking question but lgtm!

this.#coreManager.deleteData(namespace, { deleteOwn: true })
)
namespacesWithoutAuth.flatMap((namespace) => [
this.#coreManager.getWriterCore(namespace).core.close(),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's the context for this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah wait is it related to this note in your PR description?

(but still close your writer Hypercore).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that's exactly it. (Let me know if that's wrong!)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think that makes sense

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not 100% sure it's the right call. My goal is:

  • When you leave, we want to close all Hypercores.
  • When you leave, we want to delete all Hypercore data except yours.

Does this express that correctly? (And is my goal correct?)

@EvanHahn
Copy link
Contributor Author

I'll plan to merge this tomorrow morning unless there are any objections.

@EvanHahn EvanHahn merged commit a301b75 into main Feb 1, 2024
7 checks passed
@EvanHahn EvanHahn deleted the dont-delete-own-data-when-leaving branch February 1, 2024 15:01
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.

Do not delete own data by default when leaving a project
2 participants