fix(sql-file): stream sqlserver zip imports incrementally

This commit is contained in:
КГБ Lieu authored and GitHub committed 2026-10-01 02:40:02 +08:00
1 parent e0f802c031
commit 64e5847f74
7 files changed
+659 -66

No files matched your search

@@ -15,7 +15,7 @@ use dbx_core::connection::AppState;
use dbx_core::database_export::{export_database_sql_core, DatabaseExportOutputCompression, DatabaseExportRequest};
use dbx_core::models::connection::DatabaseType;
use dbx_core::sql::SqlFileRequest;
use dbx_core::sql_file_import::execute_sql_file_paths;
use dbx_core::sql_file_import::execute_sql_file_zip_package_paths;
use std::sync::Arc;
use std::time::Instant;
use tokio_util::sync::CancellationToken;
@@ -225,7 +225,12 @@ async fn manual_e2e_sqlserver_default_split_zip_export_then_import_skip_relation
let file_path_refs: Vec<&std::path::Path> = extracted_paths.iter().map(|path| path.as_path()).collect();
let import_progress_log = std::sync::Mutex::new(Vec::new());
let started_at = Instant::now();
let import_result = execute_sql_file_paths(
// Use the dedicated ZIP-package entry point, exactly as the desktop/web
// dispatch sites now do once `is_zip_package` is correctly derived from
// these extracted part paths (see PR #10632 review: routing previously
// fell through to `execute_sql_file_paths`, silently losing the
// persistent splitter across parts this whole flow is meant to exercise).
let import_result = execute_sql_file_zip_package_paths(
&reimport_state,
&import_request,
&file_path_refs,