Browse Source

release: 2.21.1 - replay records no history, max_versions enforced, eviction/snapshot races (bug fix, server only)

fszontagh 1 tháng trước cách đây
mục cha
commit
8c1c45221a
2 tập tin đã thay đổi với 32 bổ sung và 1 xóa
  1. 31 0
      CHANGELOG.md
  2. 1 1
      VERSION

+ 31 - 0
CHANGELOG.md

@@ -12,6 +12,37 @@ consumer-facing usage is in `docs/integration-guide.md`.
 
 ## Unreleased
 
+## 2.21.1 - 2026-10-22 (bug fix, server only)
+### Fixed
+- **[server]** ⚠ Every boot that replayed the WAL recorded each replayed
+  update and delete in version history AGAIN (it had been recorded when first
+  written), and did so for collections with versioning OFF too, because replay
+  runs before the collection settings are loaded. One production boot that
+  replayed 14,998 entries (after a stop that was killed mid-snapshot) wrote
+  1.9 GB of history into two versioning-off collections. Replay now records no
+  history.
+- **[server]** `max_versions` was enforced only when it was lowered, so a
+  capped collection's history file grew without bound (a comment claimed the
+  snapshot loop pruned it; nothing did). After each snapshot, a capped file
+  that has grown past 16 MB and twice its size at its last prune is now pruned
+  to the cap. The first snapshot after the upgrade prunes every capped file
+  over 16 MB once, which reclaims history like the 1.9 GB above.
+- **[server]** Eviction removed a document from memory a moment before
+  recording its stub, so for that moment it was in neither place: a snapshot
+  that had listed it could write it as deleted. The stub is now recorded first.
+- **[server]** Two snapshots could run at once (the final snapshot at shutdown
+  and the periodic one); within the same second they shared a file name, and
+  one failed or renamed the other's half-written file. Snapshots now run one
+  at a time.
+### Changed
+- **[server]** The boot key audit no longer logs one line per adopted row; the
+  summary says how many were adopted (loaded unchanged) and how many are not
+  adoptable because their collection exists only on disk. In `report` mode
+  each collection says what `adopt` would do, and `consistency-report.json`
+  carries `collection_in_memory` per collection, so the step can be sized
+  before it is taken.
+
+
 ## 2.21.0 - 2026-10-22 (out of cycle, owner-approved; server only)
 ### Fixed
 - **[server]** ⚠ A snapshot silently left out every document that stayed

+ 1 - 1
VERSION

@@ -1 +1 @@
-2.21.0
+2.21.1