Skip to content

Commit fb2f718

Browse files
Merge pull request #391 from MPCoreDeveloper/docs/2.0.0.2-finalize
docs(2.0.0.2): finalize release documentation
2 parents 9291cca + e95e7aa commit fb2f718

4 files changed

Lines changed: 32 additions & 9 deletions

File tree

‎docs/2.0.0.2_WHAT_CHANGED.md‎

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
# SharpCoreDB 2.0.0.2 — What changed & the 2.x engine vs the 1.9.x line
22

33
- **Release:** `2.0.0.2` (2026-09-04) — 4-part patch release on the 2.0.0.x line.
4-
- **Quality gate:** full suite **1770 tests / 0 failed**, CI green on Windows/Ubuntu/macOS +
5-
CodeQL + SonarCloud + Server Compatibility Smoke for every merged PR.
6-
- **Contents:** everything merged since 2.0.0.1 — the perf/hardening batch of PRs #376-#388 —
7-
plus the consolidated 2.x-vs-1.9.x overview below.
4+
- **Quality gate:** full core suite **1777 tests / 0 failed**; CI-filtered core suite **1674 / 0**,
5+
plus SharpCoreDB.CQRS.Tests 64/64, VectorSearch 143, EF Core 116 and Functional.Linq2DB 24 —
6+
validated on Windows/Ubuntu/macOS + CodeQL + SonarCloud + Server Compatibility Smoke.
7+
- **Contents:** everything merged since 2.0.0.1 — the perf/hardening batch (PRs #376-#388), the
8+
release documentation PR #389, and the reopen **data-integrity hardening** PR #390 described
9+
below.
810
- See `docs/CHANGELOG.md` → `[2.0.0.2]` for the detailed change list and
911
`docs/2.0.0.0_WHAT_CHANGED.md` for the full 2.0.0.0 report (this document is the short,
1012
forward-looking summary).
@@ -15,7 +17,7 @@
1517
| Step | 1.9.x | 2.x |
1618
|---|---|---|
1719
| Record layout | variable-length length-prefixed rows only | **Fixed-width record layout** (constant stride + out-of-line `.ovf` overflow arena) for columnar PK tables; **default for new PK tables** since B7; per-table flag **persisted in metadata** (authoritative on reopen) with **1.x → 2.0 auto-migration** (opt-in via `FixedWidthRecordLayout`) |
18-
| DELETE durability | logical delete + full-file rewrite at flush | **Commit-time tombstone markers** (in-place negative length-prefix) → durable in O(delete), no full-file rewrite |
20+
| DELETE durability | logical delete + full-file rewrite at flush | **Commit-time tombstone markers** (in-place negative length-prefix) → durable in O(delete), no full-file rewrite; legacy (1.x) variable-length tables additionally purge remaining versions of a deleted key so stale rows cannot resurrect after reopen |
1921
| In-place writes | only same-length patches, buffered later | **Buffered in-place overwrites flushed per storage page** (C6); markers also batched per page (C5) |
2022
| Single-file (`.scdb`) | fixed-layout registry, compression bugs | **Format v2** (block registry/FSM/table directory), crash-safe auto-migration, block-level Brotli/GZip/Zstd, envelope encryption, concurrent-write corruption fix (2.0.0.1) |
2123

@@ -46,6 +48,18 @@
4648
PageBased (not yet OLTP-ready: ~26K UPDATE ops/s vs ~245K on the fixed-width Columnar path);
4749
PageBased remains explicit opt-in.
4850
- 4-part patch versioning (`n.n.n.n`) since 2.0.0.0.
51+
- **Reopen data-integrity fixes (PR #390, found by the new reopen round-trip matrix):**
52+
- **Overflow-arena reload** — a valid zero-length record (empty TEXT/BLOB value) was treated as
53+
end-of-file by the `.ovf`/data-file loader, silently dropping every later row/block after a
54+
reopen; length-0 records are now parsed as valid empty payloads.
55+
- **Single-file fixed-width overflow arena** — freed blocks were serialized as zero-filled gaps
56+
that misaligned the sequential loader; dead slots are now persisted as negative-length
57+
tombstone markers tracked across sessions.
58+
- **Legacy (1.x) variable-length DELETE** — only the newest row version was tombstoned, so an
59+
older stale UPDATE version won the reopen index rebuild and resurrected the deleted row;
60+
DELETE now purges every remaining record of a deleted key (1.x-upgrade path made safe).
61+
- Locked in by `ReopenRoundTripMatrixTests` (four storage variants × insert/update/delete ×
62+
three reopen rounds) and dedicated empty-value/delete regressions.
4963

5064
## Benchmark snapshot (fair-PK, tuned harness config, median-of-3, same machine)
5165

‎docs/INDEX.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# SharpCoreDB Documentation Index
22

3-
**Status:** Active documentation set (`2.0.0.0`)
3+
**Status:** Active documentation set (`2.0.0.2`)
44

55
## 0. Manual (start here)
66

@@ -23,6 +23,8 @@ guide explaining when SharpCoreDB is fastest.
2323

2424
## 0b. Release notes
2525

26+
- `2.0.0.2_WHAT_CHANGED.md` — **what's new in 2.0.0.2** (2.x-vs-1.9.x major steps + the hardening
27+
and data-integrity batch)
2628
- `2.0.0.0_WHAT_CHANGED.md` — **what's new in v2.0 vs v1.9** (features + benchmarks vs SQLite/LiteDB)
2729

2830
## 1. Project Entry Points

‎docs/manual/upgrade-and-downgrade.md‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Downgrade below this line is **not supported** after the database contains certa
77

88
| Scenario | Supported? | Notes |
99
|---|---|---|
10-
| Open a legacy (pre-fixed-width, variable-length) database with the current version | ✅ Yes | Plaintext + encrypted-header legacy files are read natively; a table without `IsFixedWidthRecords` stays variable-length (the persisted flag is authoritative). |
10+
| Open a legacy (pre-fixed-width, variable-length) database with the current version | ✅ Yes | Plaintext + encrypted-header legacy files are read natively; a table without `IsFixedWidthRecords` stays variable-length (the persisted flag is authoritative). UPDATE/DELETE on such tables is safe in 2.0.0.2: DELETE purges older stale row versions of a deleted key so deleted rows cannot resurrect after a reopen. |
1111
| Open a current fixed-width Columnar database with the current version after reopen cycles | ✅ Yes | Covered by `FormatCompatPolicyTests` / `FixedWidthMigrationTests`; per-table flag persisted. |
1212
| Migrate a legacy table to fixed-width | ✅ Yes (opt-in) | `DatabaseConfig.FixedWidthRecordLayout = true` triggers `MigrateToFixedWidth()` on open (never on read-only opens). |
1313
| Open a database written by the **current** version (contains commit-time tombstone markers) with an **older** version that predates markers | ❌ **Not supported** | Deleted rows are stored as **negative length-prefix markers** (introduced with commit-time tombstones). An older binary that only knows positive length prefixes cannot skip these records and must not be pointed at such a file. |
@@ -32,8 +32,9 @@ Recommended upgrade order:
3232
## Verification
3333

3434
- In-repo: `FormatCompatPolicyTests`, `FixedWidthMigrationTests`,
35-
`DefaultEngineSelectionTests`, and the full suite (currently 1768+ tests) cover legacy reads,
36-
opt-in migration, marker durability across reopen cycles, and the default fast-path engine.
35+
`DefaultEngineSelectionTests`, `ReopenRoundTripMatrixTests` and the full suite (currently 1777+
36+
tests) cover legacy reads, opt-in migration, marker durability across reopen cycles, and the
37+
default fast-path engine.
3738
- Planned (CI): a true **cross-version** job that writes a database with a pinned older commit and
3839
reads it with `master` (requires an old-binary generator; tracked as follow-up).
3940

‎src/SharpCoreDB/NuGet.README.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ SharpCoreDB is a modern, encrypted, file-based database engine with SQL support,
2222
OLTP-ready); upgrade/downgrade policy documented with format-compat regression tests; a
2323
pure-default-config benchmark arm (`--pk-default`) and a same-window interleaved A/B mode
2424
(`--pk-ab`) now guard the numbers.
25+
- **Reopen data-integrity fixes** — a reopen round-trip hardening sweep fixed three silent-data-loss
26+
edge cases: empty TEXT/BLOB values no longer truncate the overflow-arena reload; the single-file
27+
fixed-width overflow arena persists freed slots as markers (no misaligned zero gaps); and legacy
28+
(1.x-upgrade) variable-length tables purge older row versions when a row is deleted, so deleted
29+
rows can no longer resurrect after a reopen. Locked in by the new `ReopenRoundTripMatrixTests`
30+
and outbox/CQRS integration coverage.
2531
- Full report (incl. the 2.x-vs-1.9.x major steps): `docs/2.0.0.2_WHAT_CHANGED.md`.
2632

2733
## What's New in 2.0.0.1

0 commit comments

Comments
 (0)