diff --git a/runtime/src/snapshot_utils.rs b/runtime/src/snapshot_utils.rs index 4a33544f8129c5..9639b21470dd3e 100644 --- a/runtime/src/snapshot_utils.rs +++ b/runtime/src/snapshot_utils.rs @@ -685,16 +685,12 @@ fn deserialize_snapshot_data_files_capped( where F: FnOnce(&mut SnapshotStreams) -> Result, { - /////////////////////// full snapshot - let (full_snapshot_file_size, mut full_snapshot_data_file_stream) = prepare_deserialize_snapshot_data_file( &snapshot_root_paths.full_snapshot_root_file_path, maximum_file_size, )?; - ////////////////////// incremental snapshot - let (incremental_snapshot_file_size, mut incremental_snapshot_data_file_stream) = if let Some(ref incremental_snapshot_root_file_path) = snapshot_root_paths.incremental_snapshot_root_file_path @@ -712,25 +708,18 @@ where (None, None) }; - ///////////////////// deserialize - let mut snapshot_streams = SnapshotStreams { full_snapshot_stream: &mut full_snapshot_data_file_stream, incremental_snapshot_stream: incremental_snapshot_data_file_stream.as_mut(), }; - let ret = deserializer(&mut snapshot_streams)?; - //////////////////// check full snapshot - check_deserialize_snapshot_data_file( full_snapshot_file_size, &snapshot_root_paths.full_snapshot_root_file_path, &mut full_snapshot_data_file_stream, )?; - ////////////////////// check incremental snapshot - if let Some(ref incremental_snapshot_root_file_path) = snapshot_root_paths.incremental_snapshot_root_file_path { @@ -994,8 +983,6 @@ where std::cmp::max(1, num_cpus::get() / 4), ); - ////////// Full Snapshot - let ( _full_snapshot_unpack_dir, full_snapshot_unpacked_snapshots_dir, @@ -1012,8 +999,6 @@ where parallel_divisions, )?; - ////////// Incremental Snapshot - let ( _incremental_snapshot_unpack_dir, incremental_snapshot_unpacked_snapshots_dir, @@ -1052,8 +1037,6 @@ where (None, None, None, None, None) }; - ///////// do rebuild - let mut unpacked_append_vec_map = full_snapshot_unpacked_append_vec_map; unpacked_append_vec_map.extend( incremental_snapshot_unpacked_append_vec_map