From d9e123af18d771581cbe702d9ce71567da40e406 Mon Sep 17 00:00:00 2001 From: Milind Srivastava Date: Tue, 25 Aug 2026 23:05:55 -0400 Subject: [PATCH] feat(query-engine): gate legacy SimpleMapStore behind a feature flag Legacy SimpleMapStoreGlobal/PerKey implement the Store trait but are only used by the simple_store_bench comparison benchmark. Gating them behind an off-by-default legacy_stores feature means future Store trait changes don't need to touch the legacy variants. --- asap-query-engine/Cargo.toml | 6 ++++++ asap-query-engine/src/stores/simple_map_store/mod.rs | 1 + 2 files changed, 7 insertions(+) diff --git a/asap-query-engine/Cargo.toml b/asap-query-engine/Cargo.toml index d780551d..bb7a8d45 100644 --- a/asap-query-engine/Cargo.toml +++ b/asap-query-engine/Cargo.toml @@ -87,6 +87,7 @@ criterion = { version = "0.5", features = ["html_reports"] } [[bench]] name = "simple_store_bench" harness = false +required-features = ["legacy_stores"] [features] #default = ["lock_profiling", "extra_debugging"] @@ -97,3 +98,8 @@ jemalloc = ["dep:tikv-jemallocator"] lock_profiling = [] # Enable extra debugging output extra_debugging = [] +# Legacy SimpleMapStore implementations, kept only for the simple_store_bench +# comparison benchmark. Off by default so the Store trait's real implementors +# are just SimpleMapStoreGlobal/PerKey — adding a Store trait method doesn't +# require updating the legacy variants. +legacy_stores = [] diff --git a/asap-query-engine/src/stores/simple_map_store/mod.rs b/asap-query-engine/src/stores/simple_map_store/mod.rs index 7ac1fd60..24773bde 100644 --- a/asap-query-engine/src/stores/simple_map_store/mod.rs +++ b/asap-query-engine/src/stores/simple_map_store/mod.rs @@ -1,5 +1,6 @@ mod common; pub mod global; +#[cfg(feature = "legacy_stores")] pub mod legacy; pub mod per_key;