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

Query not working #20

Open
clehner opened this issue Dec 25, 2020 · 7 comments
Open

Query not working #20

clehner opened this issue Dec 25, 2020 · 7 comments

Comments

@clehner
Copy link

clehner commented Dec 25, 2020

With ssb-backlinks v2.1.1, the following query returns an empty result set. With v2.0.1, it returns results.

sbotc backlinks.read '{"reverse":true,"query":[{"$filter":{"dest":"%q5d5Du+9WkaSdjc8aJPZm+jMrqgo0tmfR+RcX5ZZ6H4=.sha256"}}]}'
@mixmix
Copy link
Member

mixmix commented Dec 26, 2020

Hmm, looking at the commit history, can't see anything obvious. Can you confirm what version on flumeview-links you have installed in your working setup @clehner ?

Would be interesting to write a simple test around this and see if we can see it failing here

@mixmix
Copy link
Member

mixmix commented Dec 26, 2020

For my average use of this module I notice I generally specify exactly where I want the backlink to be occurring in the message structure. I wonder if that's why I've not had problems?

@clehner
Copy link
Author

clehner commented Dec 26, 2020

flumeview-links v2.1.0.

I tried writing a test case but it passes with latest ssb-backlinks as well as v2.0.1:
ssb-backlinks-test.patch

I then tried updating to latest ssb-backlinks and after regenerating indexes it works again. (I still have the set of broken indexes saved for any debugging purposes.) So I guess I have encountered a transient bug somewhere in the stack, not necessarily in the ssb-backlinks module. I will close this issue for now.

@clehner clehner closed this as completed Dec 26, 2020
@clehner
Copy link
Author

clehner commented Jan 1, 2021

The issue has reoccurred. Deleting ssb-backlinks's flume index and allowing to rebuild fixed it again. I think it may have happened again after my ssb-server crashed. I am going to try to save the stack trace next time it crashes.

@clehner clehner reopened this Jan 1, 2021
@mixmix
Copy link
Member

mixmix commented Jan 1, 2021

Thanks for your thoroughness @clehner
Oh man this sounds like a squirrely ghost 👻

@black-puppydog
Copy link

Thanks @clehner for pointing me to this. I might have seen this in patchwork after bumping ssb-backlinks recently. Will have to do more testing, but testing in patchwork is 100% compile&run based.

@elavoie
Copy link

elavoie commented Sep 3, 2022

I have had this problem as well, over a database with a single log and a single 'about' message in it. Similar to cel, deleting the the flume index (~/.ssb/flume/backlinks-...) solves the issue.

I have been going back and forth between Patchwork and using ssb-server directly, over the same ~.ssb folder. Maybe that contributes to it?

When are the indexes built/rebuilt?

In my case, I was playing around with 'ssb-suggest' but I was initially killing it quickly at the beginning without leaving it time to build the cache, so it is possible that suddenly closing in the middle of an index build leaves the index in an inconsistent state.

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

No branches or pull requests

4 participants