@@ -303,16 +303,14 @@ impl KVStoreSync for VssStore {
303303 }
304304
305305 fn list ( & self , primary_namespace : & str , secondary_namespace : & str ) -> io:: Result < Vec < String > > {
306- // FIXME: list keys
307- /*
308- // Alby: also list keys from secondary storage
309- let secondary_keys =
310- self.secondary_kv_store.list(primary_namespace, secondary_namespace)?;
311-
312- let all_keys: Vec<String> =
313- keys.iter().cloned().chain(secondary_keys.iter().cloned()).collect();
314- Ok(all_keys)
315- */
306+ // Alby: we use a secondary store for the network graph and currently don't support merging results
307+ if primary_namespace == NETWORK_GRAPH_PERSISTENCE_PRIMARY_NAMESPACE {
308+ panic ! ( "Alby: cannot list from NETWORK_GRAPH_PERSISTENCE_PRIMARY_NAMESPACE" ) ;
309+ }
310+ if primary_namespace == "" {
311+ panic ! ( "Alby: cannot list from empty primary namespace" ) ;
312+ }
313+
316314 let internal_runtime = self . internal_runtime . as_ref ( ) . ok_or_else ( || {
317315 debug_assert ! ( false , "Failed to access internal runtime" ) ;
318316 let msg = format ! ( "Failed to access internal runtime" ) ;
@@ -433,16 +431,14 @@ impl KVStore for VssStore {
433431 fn list (
434432 & self , primary_namespace : & str , secondary_namespace : & str ,
435433 ) -> Pin < Box < dyn Future < Output = Result < Vec < String > , io:: Error > > + Send > > {
436- // FIXME: list keys
437- /*
438- // Alby: also list keys from secondary storage
439- let secondary_keys =
440- self.secondary_kv_store.list(primary_namespace, secondary_namespace)?;
441-
442- let all_keys: Vec<String> =
443- keys.iter().cloned().chain(secondary_keys.iter().cloned()).collect();
444- Ok(all_keys)
445- */
434+ // Alby: we use a secondary store for the network graph and currently don't support merging results
435+ if primary_namespace == NETWORK_GRAPH_PERSISTENCE_PRIMARY_NAMESPACE {
436+ panic ! ( "Alby: cannot list from NETWORK_GRAPH_PERSISTENCE_PRIMARY_NAMESPACE" ) ;
437+ }
438+ if primary_namespace == "" {
439+ panic ! ( "Alby: cannot list from empty primary namespace" ) ;
440+ }
441+
446442 let primary_namespace = primary_namespace. to_string ( ) ;
447443 let secondary_namespace = secondary_namespace. to_string ( ) ;
448444 let inner = Arc :: clone ( & self . inner ) ;
0 commit comments