File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,16 @@ use tracing::warn;
4747
4848pub async fn delete ( stream_name : Path < String > ) -> Result < impl Responder , StreamError > {
4949 let stream_name = stream_name. into_inner ( ) ;
50- if !PARSEABLE . streams . contains ( & stream_name) {
50+ // Error out if stream doesn't exist in memory, or in the case of query node, in storage as well
51+ if !PARSEABLE . streams . contains ( & stream_name)
52+ && PARSEABLE . options . mode == Mode :: Query
53+ && matches ! (
54+ PARSEABLE
55+ . create_stream_and_schema_from_storage( & stream_name)
56+ . await ,
57+ Ok ( true ) | Err ( _)
58+ )
59+ {
5160 return Err ( StreamNotFound ( stream_name) . into ( ) ) ;
5261 }
5362
Original file line number Diff line number Diff line change @@ -569,7 +569,7 @@ impl Stream {
569569 }
570570
571571 pub fn get_retention ( & self ) -> Option < Retention > {
572- self . metadata . read ( ) . expect ( LOCK_EXPECT ) . retention . clone ( )
572+ dbg ! ( self . metadata. read( ) . expect( LOCK_EXPECT ) . retention. clone( ) )
573573 }
574574
575575 pub fn get_schema_version ( & self ) -> SchemaVersion {
@@ -596,7 +596,7 @@ impl Stream {
596596 }
597597
598598 pub fn set_retention ( & self , retention : Retention ) {
599- self . metadata . write ( ) . expect ( LOCK_EXPECT ) . retention = Some ( retention) ;
599+ self . metadata . write ( ) . expect ( LOCK_EXPECT ) . retention = Some ( dbg ! ( retention) ) ;
600600 }
601601
602602 pub fn set_first_event_at ( & self , first_event_at : & str ) {
You can’t perform that action at this time.
0 commit comments