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

replication: create rad/id and rad/self symref #709

Merged
merged 2 commits into from
Jun 25, 2021
Merged

Conversation

FintanH
Copy link
Contributor

@FintanH FintanH commented Jun 18, 2021

Fixes #708

We add rad/id at the top level and create a symbolic ref between rad/id and rad/self for each tracked peer.

In the daemon code I changed the get_user function to return a regular Person document and added get_local for getting the local identity.

I chose to add the test to daemon/replication because I thought it would have fitted with the menage tests but they're no bueno right now.

kim
kim previously approved these changes Jun 19, 2021
Copy link
Contributor

@kim kim left a comment

Choose a reason for hiding this comment

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

I think that this should‘ve worked without this patch, but whatever....

`get_user` should return `Person`, and we add `get_local` which gets a
`LocalIdentity`.

Signed-off-by: Fintan Halpenny <[email protected]>
@FintanH FintanH force-pushed the finto/rad-id-symref branch from 723a08b to 39cd7fb Compare June 25, 2021 14:11
xla
xla previously approved these changes Jun 25, 2021
Copy link
Contributor

@xla xla left a comment

Choose a reason for hiding this comment

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

utACK

🗾 ♻️ 🍮 ⛳️

fn adopt_rad_self(storage: &Storage, urn: &Urn, peer: PeerId) -> Result<(), Error> {
let rad_self = Reference::rad_self(Namespace::from(urn), peer);

// We only need to crate the rad/id there's a rad/self
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// We only need to crate the rad/id there's a rad/self
// We only need to create the rad/id there's a rad/self

alexjg
alexjg previously approved these changes Jun 25, 2021
Before this patch a `rad/self` would be replicated, however, there would
be no corresponding `rad/id` at the top-level. This patch introduces the
adding of the `rad/id` and creating a symbolic ref between `rad/id` and
`rad/self` for each tracked peer.

Signed-off-by: Fintan Halpenny <[email protected]>
@FintanH FintanH dismissed stale reviews from alexjg and xla via a98218d June 25, 2021 20:07
@FintanH FintanH force-pushed the finto/rad-id-symref branch from 39cd7fb to a98218d Compare June 25, 2021 20:07
@FintanH FintanH merged commit a98218d into master Jun 25, 2021
@FintanH FintanH deleted the finto/rad-id-symref branch June 25, 2021 20:07
@github-pages github-pages bot temporarily deployed to github-pages June 25, 2021 20:07 Inactive
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.

Feature: replicate Person data
4 participants