Skip to content
This repository has been archived by the owner on Sep 30, 2023. It is now read-only.

Updated - Resolve sync only after heads have been added #84

Merged
merged 7 commits into from
Feb 11, 2020
Merged

Updated - Resolve sync only after heads have been added #84

merged 7 commits into from
Feb 11, 2020

Conversation

msterle
Copy link
Contributor

@msterle msterle commented Jan 13, 2020

Builds off of #38, resolving issue with event listeners.

Allows orbitdb/orbitdb#606 to be merged.

tyleryasaka and others added 6 commits November 29, 2018 00:46
This first checks if anything is in the queue or buffer to be processed. If so, then it waits for a `replicate.progress` event (where the progress is complete) and then waits for the `replicated` event.

The downside to this is that if other things are being added to the queue rapidly, then this may hang indefinitely. That said, currently as this is used in orbit-db, this would not block anything other than the new event I have proposed adding, so it should be fine?

Ideally, what should really happen is that we should have a way of knowing when the items derived from the given heads have been replicated. Currently, however, the queue is a black hole and there's no way to track the graph that branches out from the heads. The queue would likely need to be refactored for this approach.
@oed
Copy link
Contributor

oed commented Jan 13, 2020

@chmanie For you to review as well :)

Copy link

@chmanie chmanie left a comment

Choose a reason for hiding this comment

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

This has been a long time coming :)

LGTM, really! Happy we're getting this in after all

@aphelionz
Copy link
Contributor

What say you, @haadcode and @shamb0t ?

@aphelionz
Copy link
Contributor

@msterle Thanks for your patience in getting this merged. I'm having some issues running the automated tests against this, but I don't think it's your fault at the moment. It looks like an js-ipfs version thing. Would you be willing to help me unravel this? We can meet up on Gitter and walk through it. I just made a commit to orbit-db-test-utils that unblocks us partly.

@aphelionz
Copy link
Contributor

@msterle LGTM! 👍

@aphelionz aphelionz merged commit 3860443 into orbitdb-archive:master Feb 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants