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;
47
47
48
48
pub async fn delete ( stream_name : Path < String > ) -> Result < impl Responder , StreamError > {
49
49
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
+ {
51
60
return Err ( StreamNotFound ( stream_name) . into ( ) ) ;
52
61
}
53
62
Original file line number Diff line number Diff line change @@ -569,7 +569,7 @@ impl Stream {
569
569
}
570
570
571
571
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( ) )
573
573
}
574
574
575
575
pub fn get_schema_version ( & self ) -> SchemaVersion {
@@ -596,7 +596,7 @@ impl Stream {
596
596
}
597
597
598
598
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) ) ;
600
600
}
601
601
602
602
pub fn set_first_event_at ( & self , first_event_at : & str ) {
You can’t perform that action at this time.
0 commit comments