mirror of
https://github.com/appy-one/acebase.git
synced 2026-05-25 06:02:14 -06:00
[PR #186] [MERGED] Fix broken B+Trees #156
Labels
No labels
IndexedDB
browser
bug
dependencies
documentation
duplicate
enhancement
feature request
indexes
indexes
invalid
pull-request
query
question
transaction logging
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/acebase#156
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/appy-one/acebase/pull/186
Author: @appy-one
Created: 12/5/2022
Status: ✅ Merged
Merged: 12/5/2022
Merged by: @appy-one
Base:
master← Head:fix/broken-b+trees📝 Commits (10+)
ecf9e4areflect: rethrowerrif notNodeNotFoundErrorcb40d89cleanupdb85791addrepairModeparam togetNext04c4e3cRepair binary B+Trees:1d1b1absimpler sort326d0e0updated debug comments39e6f4euse new BinaryBPlusTree constructor3d06727pass DebugLoggerd35977eprevent tree allocation issue #183:9f4bc3dcleanup📊 Changes
8 files changed (+402 additions, -171 deletions)
View changed files
📝
src/acebase-local.ts(+34 -25)📝
src/api-local.ts(+4 -0)📝
src/btree/binary-tree-builder.ts(+0 -8)📝
src/btree/binary-tree-leaf.ts(+1 -1)📝
src/btree/binary-tree.spec.ts(+4 -4)📝
src/btree/binary-tree.ts(+212 -78)📝
src/data-index/data-index.ts(+8 -2)📝
src/storage/binary/index.ts(+139 -53)📄 Description
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.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.