diff --git a/graph/src/catalog.rs b/graph/src/catalog.rs index 97e8cf69..10df7343 100644 --- a/graph/src/catalog.rs +++ b/graph/src/catalog.rs @@ -19,8 +19,8 @@ pub(crate) use graphs::{ GraphMetadata, GraphPrivilege, GraphQuota, GraphQuotaUsage, }; pub(crate) use read::{ - catalog_fingerprint, current_catalog_state, current_catalog_state_from_rows, read_catalog, - read_catalog_for_graph, + catalog_fingerprint, current_catalog_state, current_catalog_state_for_graph, + current_catalog_state_from_rows, read_catalog, read_catalog_for_graph, }; #[cfg(feature = "pg_test")] pub(crate) use validate::validate_numeric_column; diff --git a/graph/src/catalog/read.rs b/graph/src/catalog/read.rs index 97043cb8..85a2afad 100644 --- a/graph/src/catalog/read.rs +++ b/graph/src/catalog/read.rs @@ -429,6 +429,23 @@ pub(crate) fn current_catalog_state() -> safety::GraphResult<(u64, Option safety::GraphResult<(u64, Option)> { + let (tables, edges, filter_columns) = read_catalog_for_graph(graph_id)?; + current_catalog_state_from_rows(&tables, &edges, &filter_columns) +} + pub(crate) fn current_catalog_state_from_rows( tables: &[builder::RegisteredTable], edges: &[builder::RegisteredEdge], diff --git a/graph/src/sql_facade/runtime.rs b/graph/src/sql_facade/runtime.rs index 1fad8c73..3ebe43f2 100644 --- a/graph/src/sql_facade/runtime.rs +++ b/graph/src/sql_facade/runtime.rs @@ -580,7 +580,7 @@ pub(crate) fn ensure_current_graph() -> safety::GraphResult<()> { let sync_mode = current_sync_mode()?; let disabled = disabled_graph_trigger_count()?; - let catalog_state = current_catalog_state()?; + let catalog_state = catalog::current_catalog_state_for_graph(&graph.graph_id)?; let applied_sync_id = ENGINE.with(|e| e.borrow().applied_sync_id); let pending = pending_sync_rows(applied_sync_id)?; ENGINE.with(|e| {