Skip to content

Commit

Permalink
modify logs.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rachelint committed May 4, 2023
1 parent bbe0019 commit 3c4b191
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion analytic_engine/src/manifest/details.rs
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ impl Manifest for ManifestImpl {
}

async fn recover(&self, load_req: &LoadRequest) -> GenericResult<()> {
info!("Manifest load data, request:{:?}", load_req);
info!("Manifest recover, request:{:?}", load_req);

// Load table meta snapshot from storage.
let location = WalLocation::new(load_req.shard_id as u64, load_req.table_id.as_u64());
Expand Down
14 changes: 12 additions & 2 deletions analytic_engine/src/table_meta_set_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,8 @@ impl TableMetaSetImpl {
meta_snapshot: MetaSnapshot,
shard_info: TableShardInfo,
) -> crate::manifest::details::Result<()> {
debug!("TableMetaSet apply snapshot, snapshot :{:?}", meta_snapshot);

let MetaSnapshot {
table_meta,
version_meta,
Expand All @@ -212,8 +214,6 @@ impl TableMetaSetImpl {
msg: format!("space not found, space_id:{space_id}"),
})?;

debug!("Instance apply add table, meta :{:?}", table_meta);

let table_name = table_meta.table_name.clone();
let table_data = Arc::new(
TableData::recover_from_add(
Expand All @@ -234,6 +234,11 @@ impl TableMetaSetImpl {

// Apply version meta to the table.
if let Some(version_meta) = version_meta {
debug!(
"TableMetaSet apply version meta, version meta:{:?}",
version_meta
);

let max_file_id = version_meta.max_file_id_to_add();
table_data.current_version().apply_meta(version_meta);
// In recovery case, we need to maintain last file id of the table manually.
Expand All @@ -242,6 +247,11 @@ impl TableMetaSetImpl {
}
}

debug!(
"TableMetaSet success to apply snapshot, table_id:{}, table_name:{}",
table_data.id, table_data.name
);

space.insert_table(table_data);

Ok(())
Expand Down

0 comments on commit 3c4b191

Please sign in to comment.