@@ -86,7 +86,7 @@ pub async fn get_prism_logstream_info(
8686
8787async fn get_stream_schema_helper ( stream_name : & str ) -> Result < Arc < Schema > , StreamError > {
8888 // Ensure parseable is aware of stream in distributed mode
89- if PARSEABLE . check_or_load_stream ( stream_name) . await {
89+ if ! PARSEABLE . check_or_load_stream ( stream_name) . await {
9090 return Err ( StreamNotFound ( stream_name. to_owned ( ) ) . into ( ) ) ;
9191 }
9292
@@ -152,7 +152,7 @@ async fn get_stream_info_helper(stream_name: &str) -> Result<StreamInfo, StreamE
152152 // For query mode, if the stream not found in memory map,
153153 //check if it exists in the storage
154154 //create stream and schema from storage
155- if PARSEABLE . check_or_load_stream ( stream_name) . await {
155+ if ! PARSEABLE . check_or_load_stream ( stream_name) . await {
156156 return Err ( StreamNotFound ( stream_name. to_owned ( ) ) . into ( ) ) ;
157157 }
158158
@@ -289,7 +289,7 @@ impl PrismDatasetRequest {
289289 }
290290
291291 // Skip streams that don't exist
292- if !self . stream_exists ( & stream) . await {
292+ if !PARSEABLE . check_or_load_stream ( & stream) . await {
293293 return Ok ( None ) ;
294294 }
295295
@@ -311,15 +311,6 @@ impl PrismDatasetRequest {
311311 }
312312 }
313313
314- async fn stream_exists ( & self , stream : & str ) -> bool {
315- if PARSEABLE . check_or_load_stream ( stream) . await {
316- warn ! ( "Stream not found: {stream}" ) ;
317- false
318- } else {
319- true
320- }
321- }
322-
323314 async fn build_dataset_response (
324315 & self ,
325316 stream : String ,
0 commit comments