|
@@ -1343,6 +1343,25 @@ collection's operations waited: on 2.17.1 run it at a quiet moment, one
|
|
|
collection at a time. Before 2.17.1 the call changed the setting and trimmed nothing,
|
|
collection at a time. 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`.
|
|
|
|
|
|
|
|
|
|
+- **⚠ Pass the collection's current `defaultTtlSeconds`.** `createCollection` on
|
|
|
|
|
+ an existing collection applies every argument that differs, and a default TTL
|
|
|
|
|
+ of 0 is a real value ("no default expiry"): a prune call written as
|
|
|
|
|
+ `createCollection(name, 0, false, N, 0)` clears an existing default TTL for
|
|
|
|
|
+ every later insert. Read it first with `getCollectionInfo(name)->defaultTtlSeconds`.
|
|
|
|
|
+ (`encrypted=false` never downgrades and `vectorDimension=0` is ignored.)
|
|
|
|
|
+- **The current documents are never touched:** only the history file is
|
|
|
|
|
+ rewritten (tmp + atomic rename), records are copied as stored, and every
|
|
|
|
|
+ document keeps its newest N versions (N >= 1).
|
|
|
|
|
+- **Measured (2.18.0):** a 56 MB history file pruned in 3.9 s, a 230 MB one in
|
|
|
|
|
+ 10.3 s. Writes that record history in THAT collection waited for the whole
|
|
|
|
|
+ prune; writes to other collections stayed under 120 ms.
|
|
|
|
|
+- **To stop recording history** use `configureCollection(versioningEnabled=false)`,
|
|
|
|
|
+ not `maxVersions=0` (which means unlimited). It only flips a config flag and
|
|
|
|
|
+ needs no window; it does not reclaim history already written. There is no
|
|
|
|
|
+ call that discards a live collection's history outright: the floor is
|
|
|
|
|
+ `maxVersions=1`, which keeps the newest version of every document id ever
|
|
|
|
|
+ written, deleted ones included.
|
|
|
|
|
+
|
|
|
#### Relation enforcement on/off (2.11.0+)
|
|
#### Relation enforcement on/off (2.11.0+)
|
|
|
|
|
|
|
|
Whether declared relations are enforced is a per-collection setting. It
|
|
Whether declared relations are enforced is a per-collection setting. It
|