mirror of
https://github.com/appy-one/acebase.git
synced 2026-05-25 06:02:14 -06:00
[PR #142] [MERGED] Data recovery: repair node #126
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#126
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/142
Author: @appy-one
Created: 8/22/2022
Status: ✅ Merged
Merged: 8/22/2022
Merged by: @appy-one
Base:
master← Head:recovery/repair-node📝 Commits (4)
d1eb102New recovery feature: repairNode (undocumented)1f3d58arepairNode unit testdec95bbfix: nodeLocker access modifier must be protected9cf8454chore: build📊 Changes
7 files changed (+243 additions, -3 deletions)
View changed files
📝
dist/browser.js(+8 -0)📝
dist/browser.min.js(+1 -1)➕
spec/recovery.spec.js(+77 -0)📝
src/acebase-local.js(+8 -0)📝
src/storage-acebase.js(+144 -0)📝
src/storage/index.d.ts(+4 -1)📝
src/ts/storage/index.ts(+1 -1)📄 Description
If a database suffers from data corruption, it is important to investigate why this happens: this is usually because of unsafe simultanious multi-process access. See #48 How to protect your database from corruption
However - in the unfortunate event of data corruption, this new feature provides a way to manually repair a broken node.
When using AceBase's own binary storage engine, it is now possible to run
await db.recovery.repairNode("path/to/broken/node"). Doing so will remove or replace the reference to it from the parent node. It does not overwrite the target record to prevent possibly breaking other data.This provides a fix for TypeError: Unknown chunk type 91 while reading record at (...)
Examples:
Recommended: backup your data before performing repairs
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.