Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Commit

Permalink
fixup! remove comments
Browse files Browse the repository at this point in the history
  • Loading branch information
brooksprumo committed Jul 9, 2021
1 parent b3e928e commit c835766
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions runtime/src/snapshot_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -685,16 +685,12 @@ fn deserialize_snapshot_data_files_capped<F, T>(
where
F: FnOnce(&mut SnapshotStreams<File>) -> Result<T>,
{
/////////////////////// 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
Expand All @@ -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
{
Expand Down Expand Up @@ -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,
Expand All @@ -1012,8 +999,6 @@ where
parallel_divisions,
)?;

////////// Incremental Snapshot

let (
_incremental_snapshot_unpack_dir,
incremental_snapshot_unpacked_snapshots_dir,
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit c835766

Please sign in to comment.