From 9d04effbbeba6184f3201e100834e7d13f09e1e3 Mon Sep 17 00:00:00 2001 From: Gabor Gevay Date: Mon, 7 Sep 2026 20:36:57 +0200 Subject: [PATCH] testdrive: skip the catalog dump when the catalog store is not validated check_catalog_state fetched and parsed the whole /api/catalog/dump after every file and only then discovered, inside with_catalog_copy, that no catalog config was supplied and the comparison had to be skipped. Only a handful of compositions pass --validate-catalog-store; everywhere else the fetch was wasted, about 700 ms per file at a 109 MB dump, plus a transient allocation of a few hundred MB in environmentd. Return early before the fetch when the config is absent. Closes: QAR-160 Co-Authored-By: Claude Fable 5.1 --- src/testdrive/src/action/consistency.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/testdrive/src/action/consistency.rs b/src/testdrive/src/action/consistency.rs index 0b3157aad307f..c84f25a01d379 100644 --- a/src/testdrive/src/action/consistency.rs +++ b/src/testdrive/src/action/consistency.rs @@ -196,6 +196,15 @@ async fn check_catalog_state(state: &State) -> Result<(), anyhow::Error> { storage_metadata: Option, } + // The comparison below needs the on-disk catalog, which `with_catalog_copy` + // can only open when a catalog config was supplied + // (`--validate-catalog-store`). Without one it returns `None` and the + // check is skipped, so do not fetch and parse the dump (100+ MB) for + // nothing. + if state.materialize.catalog_config.is_none() { + return Ok(()); + } + // Dump the in-memory catalog state of the Materialize environment that we're // connected to. let memory_catalog = reqwest::get(&format!(