appy-one / acebase

A fast, low memory, transactional, index & query enabled NoSQL database engine and server for node.js and browser with realtime data change notifications
MIT License
491 stars 27 forks source link

Fix broken B+Trees #186

Closed appy-one closed 1 year ago

appy-one commented 1 year ago

Closes #183

Adds a recovery options that repairs damaged nodes that use a B+Tree to store its child keys.

Usage: await db.recovery.repairNodeTree(path) (execute once to fix)

This PR also prevents B+Trees from becoming damaged in the future if it grows, but fails to be rewritten to disk because of a filesystem error.