reddb-cli 0.1.2-next.79 → 0.1.2-next.81

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +18 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -305,6 +305,24 @@ RedDB uses multiple optimization techniques for fast queries at scale:
305
305
 
306
306
  ---
307
307
 
308
+ ## Durability & Corruption Defense
309
+
310
+ RedDB uses 7 layers of protection to keep your data safe:
311
+
312
+ | Layer | What it does |
313
+ |:------|:-------------|
314
+ | **File Lock** | Exclusive `flock` prevents two processes from writing the same `.rdb` file |
315
+ | **Double-Write Buffer** | Pages written to `.rdb-dwb` first; survives torn writes on power loss |
316
+ | **Header Shadow** | Copy of page 0 in `.rdb-hdr`; auto-recovers if header corrupts |
317
+ | **Metadata Shadow** | Copy of page 1 in `.rdb-meta`; auto-recovers collection registry |
318
+ | **fsync Discipline** | All critical writes followed by `sync_all()` (not just flush) |
319
+ | **Two-Phase Checkpoint** | Crash-safe WAL→DB transfer with `checkpoint_in_progress` flag |
320
+ | **Binary Store CRC32** | V3 files have CRC32 footer + atomic write-to-temp-then-rename |
321
+
322
+ Every page has a CRC32 checksum (verified on read). Every WAL record has a CRC32 checksum. The binary store format (V3) includes a full-file CRC32 footer.
323
+
324
+ ---
325
+
308
326
  ## Quick Start
309
327
 
310
328
  ```bash
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reddb-cli",
3
- "version": "0.1.2-next.79",
3
+ "version": "0.1.2-next.81",
4
4
  "description": "JavaScript/TypeScript SDK for RedDB - unified multi-model database",
5
5
  "type": "commonjs",
6
6
  "main": "./sdk/red-sdk.js",