Skip to content

Commit

Permalink
nit
Browse files Browse the repository at this point in the history
  • Loading branch information
xxchan committed Sep 6, 2024
1 parent d5f5d1a commit f825c33
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/ctl/src/cmd_impl/meta/cluster_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ pub async fn source_split_info(context: &CtlContext, ignore_id: bool) -> anyhow:
revision: _,
} = get_cluster_info(context).await?;

let mut actor_splits_map: BTreeMap<u32, String> = BTreeMap::new();
let mut actor_splits_map: BTreeMap<u32, (usize, String)> = BTreeMap::new();

// build actor_splits_map
for table_fragment in &table_fragments {
Expand Down Expand Up @@ -69,7 +69,7 @@ pub async fn source_split_info(context: &CtlContext, ignore_id: bool) -> anyhow:
.map(|split| split.id())
.collect_vec()
.join(",");
actor_splits_map.insert(actor.actor_id, splits);
actor_splits_map.insert(actor.actor_id, (splits.len(), splits));
}
}
}
Expand Down Expand Up @@ -112,15 +112,15 @@ pub async fn source_split_info(context: &CtlContext, ignore_id: bool) -> anyhow:
}
);
for actor in &fragment.actors {
if let Some(splits) = actor_splits_map.get(&actor.actor_id) {
if let Some((split_count, splits)) = actor_splits_map.get(&actor.actor_id) {
println!(
"\t\tActor{} ({} splits): [{}]{}",
if ignore_id {
"".to_string()
} else {
format!(" #{:<3}", actor.actor_id,)
},
splits.len(),
split_count,
splits,
if !actor.upstream_actor_id.is_empty() {
assert!(
Expand All @@ -136,7 +136,7 @@ pub async fn source_split_info(context: &CtlContext, ignore_id: bool) -> anyhow:
} else {
format!(" #{}", actor.upstream_actor_id[0])
},
upstream_splits
upstream_splits.1
)
} else {
"".to_string()
Expand Down

0 comments on commit f825c33

Please sign in to comment.