fix: in-process memoization of collection metadata to reduce CPU overhead (#14420) by Ezeko · Pull Request #14686 · appwrite/appwrite · GitHub
Skip to content

fix: in-process memoization of collection metadata to reduce CPU overhead (#14420) - #14686

Open
Ezeko wants to merge 3 commits into
appwrite:mainfrom
Ezeko:fix-14420-collection-metadata-cache
Open

Ezeko wants to merge 3 commits into
appwrite:mainfrom
Ezeko:fix-14420-collection-metadata-cache

fix(database): partition collection memo by adapter host and verify g…

36cccd8
Select commit
Loading
Failed to load commit list.
hansi.codes / Hansi completed Oct 19, 2026 in 1m 31s

Tier S: Ready to merge

The previously reported host-key and generation-read races are addressed, and I found no remaining issues in the new changes.

Adds an in-process memo for collection definitions with defensive cloning, transaction bypass, and generation-based validation, and provisions the custom Database implementation through the factory. The latest updates isolate memo entries by adapter hostname and guard memoization against generation changes during metadata lookup.