diff --git a/src/daft-io/src/object_io.rs b/src/daft-io/src/object_io.rs index 3e624cb27f..190ca37d3a 100644 --- a/src/daft-io/src/object_io.rs +++ b/src/daft-io/src/object_io.rs @@ -116,17 +116,21 @@ pub(crate) async fn recursive_iter( source: Arc, uri: &str, ) -> super::Result>> { + log::debug!("starting recursive lister with top level of: {uri}"); let (to_rtn_tx, mut to_rtn_rx) = tokio::sync::mpsc::channel(16 * 1024); fn add_to_channel( source: Arc, tx: Sender>, dir: String, ) { + log::debug!("spawning task to list: {dir}"); tokio::spawn(async move { let s = source.iter_dir(&dir, None, None).await; + log::debug!("started listing task for {dir}"); let mut s = match s { Ok(s) => s, Err(e) => { + log::debug!("Error occured when listing {dir}\nerror:\n{e}"); tx.send(Err(e)).await.map_err(|se| { super::Error::UnableToSendDataOverChannel { source: se.into() } })?; @@ -142,6 +146,7 @@ pub(crate) async fn recursive_iter( .await .map_err(|e| super::Error::UnableToSendDataOverChannel { source: e.into() })?; } + log::debug!("completed listing task for {dir}"); super::Result::Ok(()) }); }