/// Load a list of all transaction file from object store. Also parse revision counter and transaction UUID.
///
/// The files are in no particular order!
Load a list of all transaction file from object store. Also parse revision counter and transaction UUID.
The files are in no particular order!
Load a list of all transaction file from object store . Also parse revision counter and transaction UUID . The files are in no particular order!
async fn list_transaction_files(
    object_store: &ObjectStore,
    server_id: ServerId,
    db_name: &str,
) -> Result<Vec<(Path, u64, Uuid)>> {
    let list_path = transactions_path(&object_store, server_id, &db_name);
    let paths = object_store
        .list(Some(&list_path))
        .await
        .context(Read {})?
        .map_ok(|paths| {
            paths
                .into_iter()
                .filter_map(|path| {
                    parse_transaction_path(path.clone())
                        .map(|(revision_counter, uuid)| (path, revision_counter, uuid))
                })
                .collect()
        })
        .try_concat()
        .await
        .context(Read {})?;
    Ok(paths)
}
async fn list_transaction_files ( object_store : & ObjectStore , server_id : ServerId , db_name : & str , ) -> Result < Vec < ( Path , u64 , Uuid ) > > { let list_path = transactions_path ( & object_store , server_id , & db_name ) ; let paths = object_store . list ( Some ( & list_path ) ) . await . context ( Read { } ) ? . map_ok ( | paths | { paths . into_iter ( ) . filter_map ( | path | { parse_transaction_path ( path . clone ( ) ) . map ( | ( revision_counter , uuid ) | ( path , revision_counter , uuid ) ) } ) . collect ( ) } ) . try_concat ( ) . await . context ( Read { } ) ? ; Ok ( paths ) }
Load a list of all transaction file from object store.
Load a list of all transaction file from object store .
object_store
&ObjectStore
server_id
ServerId
db_name
&str