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

branchStream can be called immediately after findOrCreate #103

Merged
merged 5 commits into from
Nov 7, 2022

Conversation

staltz
Copy link
Member

@staltz staltz commented Nov 7, 2022

Context

Tests were failing downstream in ssb-tribes2 when I created a groupFeed and then tried to use branchStream to replicate that to other peers.

Problem

After findOrCreate, branchStream had to "wait" for the ssb-db2 bendybutt message to be processed and then converted to a "details" object.

If you called branchStream immediately after findOrCreate was done, this means you would miss the newly-created leaf feed.

Solution

As soon as findOrCreate is done, updateLookup on the branchStream logic so that the data is synchronously available there.

1st ❌ 2nd ✔️

@staltz staltz requested a review from arj03 November 7, 2022 14:44
lookup.js Outdated Show resolved Hide resolved
@arj03
Copy link
Member

arj03 commented Nov 7, 2022

Just one minor thing, the rest looks good and great way to simplify the usage of this module.

Copy link
Member

@arj03 arj03 left a comment

Choose a reason for hiding this comment

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

Great 👍

@staltz staltz merged commit 7800271 into master Nov 7, 2022
@staltz staltz deleted the update-lookup-asap branch November 7, 2022 15:24
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.

None yet

2 participants