Преглед изворни кода

docs: a defensive createCollection(encrypted=true) buys one compacting restart

Reported by smartbotic-vectorapi: the first run of a client that sets the flag
on every startup against 2.17.x requests a reseal, so the next database
restart compacts every project. Plan it inside the upgrade window. ROADMAP:
request the reseal only when the online upgrade rewrote something.
fszontagh пре 1 месец
родитељ
комит
033dc69410
2 измењених фајлова са 13 додато и 0 уклоњено
  1. 3 0
      docs/ROADMAP.md
  2. 10 0
      docs/integration-guide.md

+ 3 - 0
docs/ROADMAP.md

@@ -382,6 +382,9 @@ joins; see 5c), which does not fit in 10 s. Run the container with
   compacts EVERY project, including ones the upgrade never touched (a 262 MB
   test env took 2.5 minutes and reclaimed nothing). Compact only the projects
   whose collections were rewritten, or skip an env whose free pages are few.
+  And request the reseal at all only when the online upgrade REWROTE something:
+  switching on a flag whose values were already encrypted (through a bare
+  alias) wrote no plaintext anywhere, yet still cost a full compaction restart.
 - Collection schemas cannot be declared in a migration file yet (the
   existing-row check lives in the SetCollectionSchema handler).
 - ~~**Bogus index declarations on a production instance (found 2026-10-09, predates 2.14.0):**~~ removed

+ 10 - 0
docs/integration-guide.md

@@ -1037,6 +1037,16 @@ restart compacts every project again** (the same cost as the migration's seal:
 about the time to copy the largest `data.mdb`), so plan it as a window, not as
 an ordinary 15-second restart. Later restarts are ordinary.
 
+**This includes the defensive idiom.** A client that calls
+`createCollection(name, ..., encrypted=true)` on every startup changes nothing
+when the collection already has the flag, but the FIRST time it runs against
+2.17.x on a collection without its own flag (for example one encrypted only
+through a bare alias name) it switches the flag on and so requests that
+compacting restart. Upgrade the database, start such clients once, then
+restart the database inside the same maintenance window, so the compaction
+does not surface weeks later as an unexplained slow restart. (Reported by
+smartbotic-vectorapi, whose prod plan now has exactly these three steps.)
+
 **Check the flag rather than assume it.** A bootstrap that calls
 `createCollection(..., encrypted=true)` only when the collection does not exist
 yet never sets it when an earlier write already created the collection