diff --git a/src/risedevtool/src/task/meta_node_service.rs b/src/risedevtool/src/task/meta_node_service.rs index 53b8bb85ab974..6692d701e3a3e 100644 --- a/src/risedevtool/src/task/meta_node_service.rs +++ b/src/risedevtool/src/task/meta_node_service.rs @@ -370,7 +370,9 @@ fn initialize_meta_store() -> Result<(), anyhow::Error> { // SQLite in-memory database does not need initialization. } else { let filename = options.get_filename(); - fs_err::write(filename, b"").context("failed to empty SQLite file")?; + if std::fs::exists(filename)? { + fs_err::write(filename, b"").context("failed to empty SQLite file")?; + } } return Ok(());