From 5bc6d76bb3d60f53600b9d1d94e3940e5dc2c7dd Mon Sep 17 00:00:00 2001 From: Grisha Kruglov Date: Wed, 25 Jul 2018 11:30:21 -0700 Subject: [PATCH] Pre: expose read_partition_map from the db crate --- db/src/db.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/db/src/db.rs b/db/src/db.rs index 524a7e17..ad28069b 100644 --- a/db/src/db.rs +++ b/db/src/db.rs @@ -472,8 +472,11 @@ pub(crate) fn read_materialized_view(conn: &rusqlite::Connection, table: &str) - } /// Read the partition map materialized view from the given SQL store. -pub(crate) fn read_partition_map(conn: &rusqlite::Connection) -> Result { - // An obviously expensive query, but we only need to run it once. +pub fn read_partition_map(conn: &rusqlite::Connection) -> Result { + // An obviously expensive query, but we use it infrequently: + // - on first start, + // - while moving timelines, + // - during sync. // First part of the union sprinkles 'allow_excision' into the 'parts' view. // Second part of the union takes care of partitions which are known // but don't have any transactions.