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

Add an iroh doc leave command #1497

Closed
b5 opened this issue Sep 20, 2023 · 1 comment · Fixed by #1589
Closed

Add an iroh doc leave command #1497

b5 opened this issue Sep 20, 2023 · 1 comment · Fixed by #1589
Labels
c-iroh feat New feature or request
Milestone

Comments

@b5
Copy link
Member

b5 commented Sep 20, 2023

Currently we have a no "leave" command exposed in the console or CLI, which means subscriptions just kinda pile up, no bueno.

proposed command:

> doc leave --help
Unsubscribe from changes to a document, optionally deleting local copy

Usage: doc leave [OPTIONS] <DOC>

Arguments:
  <DOC> the document ID to leave

Options:
  --remove     delete local copy of the document & remove it from the list of documents
  -h, --help    Print help

I'd like to have the --remove flag on leave because I think that's the closest to what's going on, in technical parlance you're "ceasing replication", and so the action of "leaving" makes it easier to imagine the thing you're leaving will continue to exist for others after you've run this command.

@b5 b5 added feat New feature or request c-iroh labels Sep 20, 2023
@b5 b5 added this to the v0.6.0 milestone Sep 20, 2023
@b5 b5 mentioned this issue Sep 20, 2023
@b5 b5 modified the milestones: v0.6.0, v0.7.0, v0.8.0 Sep 26, 2023
@Frando
Copy link
Member

Frando commented Oct 6, 2023

Implemented this in #1589

@Frando Frando mentioned this issue Oct 6, 2023
3 tasks
github-merge-queue bot pushed a commit that referenced this issue Oct 10, 2023
## Description

In `iroh-sync`:
* feat: Add `Store::remove_replica` to remove a replica (namespace
secret key and all entries)
* feat: Adds `closed` atomic bool on `Replica` to ensure no operations
can be performed on closed or removed replicas
* refactor: To not add yet another `Arc` for the `closed` marker, move
all things into `InnerReplica`

In `iroh`:
* feat: Add `DocDrop` to RPC protocol
* rename `StopSync` to `Leave`
* feat: Add `doc leave` command to CLI / console. `doc leave` runs
`DocStopSync` in the RPC layer (we already had that),
* feat: Add `doc drop` command to delete a document

## Notes & open questions

Fixes #1497 

## Change checklist

- [x] Self-review.
- [x] Documentation updates if relevant.
- [x] Tests if relevant.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c-iroh feat New feature or request
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants