perf(export): run export cores on the blocking pool
This commit is contained in:
8 files changed
+108
-6
No files matched your search
@@ -67,7 +67,9 @@ pub async fn start_database_export(
|
||||
let cancelled = Arc::new(AtomicBool::new(false));
|
||||
let cancelled_progress = cancelled.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 = database_export::export_database_sql_core(&app, &req, |progress| {
|
||||
if matches!(progress.status, ExportStatus::Cancelled) {
|
||||
cancelled_progress.store(true, Ordering::SeqCst);
|
||||
|
||||
@@ -69,7 +69,9 @@ pub async fn start_query_result_export(
|
||||
let cancelled = Arc::new(AtomicBool::new(false));
|
||||
let cancelled_progress = cancelled.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 execution_id = req.execution_id.clone().filter(|id| !id.trim().is_empty());
|
||||
let registered_query = execution_id.as_ref().map(|id| {
|
||||
app.running_queries.register_task(
|
||||
|
||||
@@ -71,7 +71,9 @@ pub async fn start_table_export(
|
||||
let cancelled = Arc::new(AtomicBool::new(false));
|
||||
let cancelled_progress = cancelled.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 = table_export::export_table_data_core(&app, &req, |progress| {
|
||||
if matches!(progress.status, ExportStatus::Cancelled) {
|
||||
cancelled_progress.store(true, Ordering::SeqCst);
|
||||
|
||||
Reference in new issue
Block a user