perf(export): run export cores on the blocking pool
This commit is contained in:
8 files changed
+108
-6
No files matched your search
@@ -34,7 +34,9 @@ pub async fn export_database_sql(
|
||||
let state = state.inner().clone();
|
||||
let export_id = request.export_id.clone();
|
||||
|
||||
tokio::spawn(async move {
|
||||
// Exports interleave async fetches with synchronous row formatting and
|
||||
// buffered disk writes; run them off the async workers (see spawn_export_task).
|
||||
dbx_core::export_runtime::spawn_export_task(async move {
|
||||
let result = dbx_core::database_export::export_database_sql_core(&state, &request, |progress| {
|
||||
emit_progress(&app, progress)
|
||||
})
|
||||
|
||||
@@ -269,7 +269,9 @@ pub async fn start_query_result_export(
|
||||
let target = StagedExportTarget::new(&request.file_path)?;
|
||||
request.file_path = target.path_string()?;
|
||||
|
||||
tokio::spawn(async move {
|
||||
// Exports interleave async fetches with synchronous row formatting and
|
||||
// buffered disk writes; run them off the async workers (see spawn_export_task).
|
||||
dbx_core::export_runtime::spawn_export_task(async move {
|
||||
let execution_id = request.execution_id.clone().filter(|id| !id.trim().is_empty());
|
||||
let registered_query = execution_id.as_ref().map(|id| {
|
||||
state.running_queries.register_task(
|
||||
|
||||
@@ -29,7 +29,9 @@ pub async fn start_table_export(
|
||||
let export_id = request.export_id.clone();
|
||||
let file_path = request.file_path.clone();
|
||||
|
||||
tokio::spawn(async move {
|
||||
// Exports interleave async fetches with synchronous row formatting and
|
||||
// buffered disk writes; run them off the async workers (see spawn_export_task).
|
||||
dbx_core::export_runtime::spawn_export_task(async move {
|
||||
let cancelled = Arc::new(AtomicBool::new(false));
|
||||
let cancelled_progress = cancelled.clone();
|
||||
let result = dbx_core::table_export::export_table_data_core(&state, &request, |progress| {
|
||||
|
||||
Reference in new issue
Block a user