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

Critical bugs with database indexing preventing use #740

Open
pospi opened this issue Aug 3, 2021 · 0 comments
Open

Critical bugs with database indexing preventing use #740

pospi opened this issue Aug 3, 2021 · 0 comments

Comments

@pospi
Copy link

pospi commented Aug 3, 2021

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-

  • Initial error state: initial DB sync finished, ssb.friends.get error message on most pages (dug into router code and tried a few).
  • Got sick of waiting, closed everything. Opened Patchwork first, followed by Oasis. Oasis did not give the "updating X feeds" message in the console this time, appeared not to start its own server as advertised.
  • Oasis UI now claims ~60% of indexing is complete. Patchwork also shows progress bar to reindex but appears to start at more like 45% complete.
  • Leave both to sync. They appear to finish almost simultaneously (coincidence?). I now see the Oasis UI 🥳

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

  • Oasis now reports that only ~30% of indexing is completed and starts the whole process over again from there.
  • The progress bar completes. Back to the same ssb.friends.get error.
  • I close and restart Oasis. Same error, no indexing progress bar shown although my CPU cores are maxed out. Even after they have died down the error is not resolved.
  • Shutting down and restarting Oasis multiple times does not resolve the error; it seems to be a "stuck" state that Oasis cannot recover from.

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

  • All identical as before, even down to the percentages of database indexed. I wonder whether there are some DB elements shared between both indexes, and what the relative sizes of these artifacts are?
  • The two indexing processes do indeed appear to be synced. It's as if Patchwork is driving Oasis entirely:

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.

@pospi pospi changed the title Bugs with database indexing Critical bugs with database indexing preventing use Aug 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant