From 796179decd0d40b7865380f6ebd0cd7a3eac07e4 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Wed, 1 Apr 2026 17:36:04 +1300 Subject: [PATCH] (fix): wrap collection mapping query in silent() to prevent hook events The find() query on dbForProject triggers lifecycle hooks (Usage, UserEvents, FunctionCache) that generate Redis messages, causing OOM under CI parallel load. Wrapping in silent() prevents these hooks from firing during the mapping query. Co-Authored-By: Claude Opus 4.6 (1M context) --- src/Appwrite/Utopia/Database/Hooks/Metadata.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Appwrite/Utopia/Database/Hooks/Metadata.php b/src/Appwrite/Utopia/Database/Hooks/Metadata.php index d34712373e..de486ebf83 100644 --- a/src/Appwrite/Utopia/Database/Hooks/Metadata.php +++ b/src/Appwrite/Utopia/Database/Hooks/Metadata.php @@ -113,10 +113,12 @@ class Metadata implements Decorator try { $collections = $this->authorization->skip( - fn () => $this->dbForProject->find($databaseKey, [ - \Utopia\Database\Query::select(['$id', '$sequence']), - \Utopia\Database\Query::limit(5000), - ]) + fn () => $this->dbForProject->silent( + fn () => $this->dbForProject->find($databaseKey, [ + \Utopia\Database\Query::select(['$id', '$sequence']), + \Utopia\Database\Query::limit(5000), + ]) + ) ); foreach ($collections as $col) {