(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) <noreply@anthropic.com>
This commit is contained in:
Jake Barnby
2026-04-01 17:36:04 +13:00
co-authored by Claude Opus 4.6
parent 21e6715bd1
commit 796179decd
@@ -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) {