fraction / oasis

Free, open-source, peer-to-peer social application that helps you follow friends and discover new ones on Secure Scuttlebutt (SSB).
http://oasis-demo.fraction.io
GNU Affero General Public License v3.0
284 stars 42 forks source link

Critical bugs with database indexing preventing use #740

Open pospi opened 2 years ago

pospi commented 2 years ago

I think either the progress bar for database indexing gets triggered too early, or something is broken internally in Oasis' version/implementation of ssb-server or its database. Seems a hard one to track down. I encountered this in regard to a hard error with ssb.friends.get on initial load, coming from an older database previously used with both Patchwork and Patchbay.

Steps that fixed #718 for me-

I am curious so I close everything and open it up again.

So- close it down, open Patchwork, open Oasis-

Peek 2021-08-03 09-50

Curiosity again- close everything down, open Patchbay, open Oasis.

It's much the same here. Patchbay appears to be driving Oasis. I'm pretty sure you can see the difference in the architectures because when Oasis does it I get 4 full CPU cores being thrashed and it happens much quicker; whereas Electron must be limited to 1 core for UI, 1 for node services as generally it will eat ~170% in my process graph.

It also seems clear that I cannot run Oasis without another SSB server already in the background, preempting its activation. If I let Oasis take over at any point, it reindexes from scratch and creates a broken database.

Conclusion-

The Oasis database indexing modules have a bug somewhere that either creates corrupt indexes or a false sense of indexing progress, whereas the older implementations work fine.

This could also be a symptom of the reverse- older UI modules being included in Oasis which actually need to be upgraded in order to bind to the correct places in the new database format.