ssbc / ssb-db2

A new database for secure-scuttlebutt
47 stars 8 forks source link

bluntlyResetAllIndexes() #382

Closed staltz closed 1 year ago

staltz commented 2 years ago

I found a need for an API that clears all indexes and rebuilds all of them.

We should instead aim to catch and study corrupted indexes from users. But having a system to catch it is complex, and takes time to build (after all, users may need to upload >=1GB worth of data to some server online). In the meantime, I want to allow users to get unstuck without forcing them to reinstall the app.

PS: I want a scary API name like bluntlyResetAllIndexes() instead of a nice and small API name like reset() because in my experience devs tend to use APIs with short names more often, and this is not something we want them to use often.

staltz commented 1 year ago

Already done, as ssb.db.reset()