|
@@ -1012,8 +1012,18 @@ backups or copies taken before the upgrade.
|
|
|
- **No double encryption:** a value already carrying `$ENC$`/`$ENCJ$` is never
|
|
- **No double encryption:** a value already carrying `$ENC$`/`$ENCJ$` is never
|
|
|
encrypted again, so the pass is idempotent.
|
|
encrypted again, so the pass is idempotent.
|
|
|
- **Boot time:** it is logged (`v2.17 at-rest`) and extends the systemd start
|
|
- **Boot time:** it is logged (`v2.17 at-rest`) and extends the systemd start
|
|
|
- timeout as it goes. On a copy of a production dataset (22,298 rows, 626 MB) it
|
|
|
|
|
- took about 6.5 minutes; the compaction shrank that file to 35 MB.
|
|
|
|
|
|
|
+ timeout as it goes. What it costs: a scan of every row and every history file
|
|
|
|
|
+ (history is REWRITTEN only where a value must change), then compacting every
|
|
|
|
|
+ project's LMDB env, which costs about the time to copy the LARGEST
|
|
|
|
|
+ `data.mdb`. Measured: 22,298 rows / 626 MB env / a 230 MB history file that
|
|
|
|
|
+ needed rewriting took about 6.5 minutes; 24,733 rows / a 339 MB env / 192 MB
|
|
|
|
|
+ of history that needed no rewriting took 190 s, of which 167 s was compacting
|
|
|
|
|
+ that one env (measured by a consumer, under a 900 MB memory cap).
|
|
|
|
|
+- **Memory:** plan with the ANONYMOUS memory (364 MiB in the second run). RSS /
|
|
|
|
|
+ VmHWM also count the file-backed LMDB map (1.1 GB in that run, above its cap)
|
|
|
|
|
+ which the kernel reclaims under pressure rather than killing anything, so an
|
|
|
|
|
+ RSS above 1 GB on a 2 GB host is not by itself a reason to stop it. Since
|
|
|
|
|
+ 2.17.1 history is rewritten one record at a time.
|
|
|
- **What it cannot reach:** copies made BEFORE that boot - backups, pre-upgrade
|
|
- **What it cannot reach:** copies made BEFORE that boot - backups, pre-upgrade
|
|
|
copies, replicas, released disk blocks. Rotate any credential that was stored
|
|
copies, replicas, released disk blocks. Rotate any credential that was stored
|
|
|
in plaintext.
|
|
in plaintext.
|
|
@@ -1022,7 +1032,10 @@ backups or copies taken before the upgrade.
|
|
|
..., encrypted=true)` on an existing collection now switches it on (never off),
|
|
..., encrypted=true)` on an existing collection now switches it on (never off),
|
|
|
and `sensitive_fields` given that way are added. Its rows and history are
|
|
and `sensitive_fields` given that way are added. Its rows and history are
|
|
|
encrypted immediately. The old plaintext copies are removed at the next
|
|
encrypted immediately. The old plaintext copies are removed at the next
|
|
|
-restart: `encryption-verify` reports `sealed: NO` until then.
|
|
|
|
|
|
|
+restart: `encryption-verify` reports `sealed: NO` until then. **That next
|
|
|
|
|
+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.
|
|
|
|
|
|
|
|
**Check the flag rather than assume it.** A bootstrap that calls
|
|
**Check the flag rather than assume it.** A bootstrap that calls
|
|
|
`createCollection(..., encrypted=true)` only when the collection does not exist
|
|
`createCollection(..., encrypted=true)` only when the collection does not exist
|
|
@@ -1273,8 +1286,10 @@ Semantics:
|
|
|
**Trimming history that already exists (2.17.1+).** `createCollection(name, ...,
|
|
**Trimming history that already exists (2.17.1+).** `createCollection(name, ...,
|
|
|
maxVersions=N)` on an EXISTING collection with a cap lower than before (or any
|
|
maxVersions=N)` on an EXISTING collection with a cap lower than before (or any
|
|
|
cap over unlimited) rewrites its history file keeping the newest N versions per
|
|
cap over unlimited) rewrites its history file keeping the newest N versions per
|
|
|
-document. It runs inside the call, so a large file takes seconds; do it at a
|
|
|
|
|
-quiet moment. Before 2.17.1 the call changed the setting and trimmed nothing,
|
|
|
|
|
|
|
+document. ⚠ It runs inside the call while holding the store's global collection
|
|
|
|
|
+lock and the global history lock, so EVERY collection's operations wait until
|
|
|
|
|
+it finishes (seconds or more for a large file): run it at a quiet moment, one
|
|
|
|
|
+collection at a time, never in a loop under live traffic. Before 2.17.1 the call changed the setting and trimmed nothing,
|
|
|
and no supported call could cut back history kept with `maxVersions = 0`.
|
|
and no supported call could cut back history kept with `maxVersions = 0`.
|
|
|
|
|
|
|
|
#### Relation enforcement on/off (2.11.0+)
|
|
#### Relation enforcement on/off (2.11.0+)
|