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

ssb-ooo saves multiple copies of the same message to the ooo flumelog #1

Open
evbogue opened this issue Apr 25, 2018 · 1 comment
Open
Labels

Comments

@evbogue
Copy link

evbogue commented Apr 25, 2018

I was playing around with using ssb-ooo in http://github.com/evbogue/mvd and I discovered that ooo.get will make a network request for a message, even after it's been saved to .ssb/ooo/log.offset. Then ooo will save a duplicate message, even if it already has the message in the log.

It seems to me that it shouldn't be requesting the message from the network, if it already has it.

My idea for mvd is to start with lower initial hops, and then use votes to request and show ooo reblogs. This way initial sync will be faster, and discovery will be more fun because you'll find people by following and then exploring via reblogs.

@dominictarr
Copy link
Contributor

hmm, that is definitely a bug.

that shouldn't be happening, though, because it get found by store.get,
and not do the request. https://github.com/dominictarr/ssb-ooo/blob/master/index.js#L45-L53

hmm, I think the problem is here:
https://github.com/dominictarr/ssb-ooo/blob/master/index.js#L65-L71
it always calls store.add after gq.query, but sometimes gq.query's response will already be coming from the store... I guess gq.query needs a way to tell the caller if it came from the network or the cache, and only add if it came from the network.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants