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 failing test for pub case #75

Closed
wants to merge 1 commit into from
Closed

add failing test for pub case #75

wants to merge 1 commit into from

Conversation

mixmix
Copy link
Member

@mixmix mixmix commented Oct 17, 2022

Mystery 🔥 If we tell the pub it wants alice's feed (ebt.request) then connect alice to the pub, NOTHING HAPPENS
(i.e. the pub does not replicate alice).


// Pub set up to want Alice's feed
pub.ebt.request(alice.id, true)
// alice.ebt.request(alice.id, true) // MYSTERY - replication fails without this
Copy link
Member Author

Choose a reason for hiding this comment

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

"Solution" 🙈

if we have alice request herself before the connection, the replication to the pub works. This is very counter-intuitive. Seems like a bug not a feature.

@staltz
Copy link
Member

staltz commented Oct 17, 2022

I think the "solution" is the solution, it's just a gotcha. One could say that ssb-ebt should do ssb.ebt.request(ssb.id, true) by default, BUT that would be a breaking change AND it would be less and less true the more we use metafeeds (at some point, your "ssb.id" will be the network identity and this is not going to be a feed and shouldn't be included in ebt).

I think a proper solution would be to document these request on the README. The README currently says

ssb-ebt itself does NOT trigger replication automatically after it's installed, instead, you need to call its API methods yourself (primarily request or block), or use a scheduler module such as ssb-replication-scheduler.

Which is good, but we need to say more. Like, in case you don't want to use ssb-replication-scheduler, how you should call ssb.ebt.request.

@mixmix
Copy link
Member Author

mixmix commented Oct 17, 2022

Closing this,, #76 resolves

@mixmix mixmix closed this Oct 17, 2022
@staltz staltz deleted the pub branch October 18, 2022 07: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.

None yet

2 participants