Sfoglia il codice sorgente

docs: repairing a collection lost from memory (audit says not adoptable)

Found on a production instance after the 2.21.4 short replay: the
collection's creation was never replayed, its rows stayed on disk. The
write-then-delete and createCollection repairs were checked on a scratch
server across two restarts, then applied there.
fszontagh 5 giorni fa
parent
commit
efb4b59055
1 ha cambiato i file con 15 aggiunte e 0 eliminazioni
  1. 15 0
      docs/integration-guide.md

+ 15 - 0
docs/integration-guide.md

@@ -2674,6 +2674,21 @@ unknown value is treated as `report`.
   they were. A disk-only row whose collection exists only on disk (not in
   memory) cannot be adopted (its options, such as the vector dimension, are
   unknown) and is reported as "not adoptable".
+- **"Not adoptable" means the collection itself was lost from memory**, most
+  likely because its creation was among the WAL records a short replay never
+  applied (the 2.21.4 incident). Symptom: `get` by id works, while `info`,
+  `find` and `count` answer "collection not found". Repair: create the
+  collection in memory again. With default options (no TTL, not encrypted,
+  `maxVersions` 0, no vectors), any write does it: insert or upsert one row
+  at an id that does not exist on disk, then delete it. The rows are
+  listable at once, and the next boot's `adopt` loads them unchanged.
+  Otherwise call `createCollection` with the collection's ORIGINAL options
+  (a vector dimension cannot be changed once vectors exist, and encryption
+  can only be switched on). Neither touches the rows on disk. The
+  collection's declared indexes, constraints and versioning switch were
+  lost with it and must be declared again. A lost collection with no rows
+  is invisible to the audit; compare your own list of collections against
+  `info`.
 - **`consistency-report.json` is overwritten at every boot**; copy it before a
   restart if you want to keep it.