mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-23 22:31:06 +00:00
Add logging to collation-generation (#2121)
Right now if the collation is not happening one will have to sprinkle log statements and then recompile the code. It's doubly annoying if that happens when working with Cumulus: that means one has to resort to .cargo/config's `paths` or `diener`, which both are not ideal. This just adds some verbose logging to save the investigators some time when looking why the collations are not happening
This commit is contained in:
@@ -202,7 +202,7 @@ async fn handle_new_activations<Context: SubsystemContext>(
|
|||||||
let availability_cores = availability_cores??;
|
let availability_cores = availability_cores??;
|
||||||
let n_validators = validators??.len();
|
let n_validators = validators??.len();
|
||||||
|
|
||||||
for core in availability_cores {
|
for (core_idx, core) in availability_cores.into_iter().enumerate() {
|
||||||
let _availability_core_timer = metrics.time_new_activations_availability_core();
|
let _availability_core_timer = metrics.time_new_activations_availability_core();
|
||||||
|
|
||||||
let (scheduled_core, assumption) = match core {
|
let (scheduled_core, assumption) = match core {
|
||||||
@@ -211,12 +211,33 @@ async fn handle_new_activations<Context: SubsystemContext>(
|
|||||||
}
|
}
|
||||||
CoreState::Occupied(_occupied_core) => {
|
CoreState::Occupied(_occupied_core) => {
|
||||||
// TODO: https://github.com/paritytech/polkadot/issues/1573
|
// TODO: https://github.com/paritytech/polkadot/issues/1573
|
||||||
|
tracing::trace!(
|
||||||
|
target: LOG_TARGET,
|
||||||
|
core_idx = %core_idx,
|
||||||
|
relay_parent = ?relay_parent,
|
||||||
|
"core is occupied. Keep going.",
|
||||||
|
);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
_ => continue,
|
CoreState::Free => {
|
||||||
|
tracing::trace!(
|
||||||
|
target: LOG_TARGET,
|
||||||
|
core_idx = %core_idx,
|
||||||
|
"core is free. Keep going.",
|
||||||
|
);
|
||||||
|
continue
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
if scheduled_core.para_id != config.para_id {
|
if scheduled_core.para_id != config.para_id {
|
||||||
|
tracing::trace!(
|
||||||
|
target: LOG_TARGET,
|
||||||
|
core_idx = %core_idx,
|
||||||
|
relay_parent = ?relay_parent,
|
||||||
|
our_para = %config.para_id,
|
||||||
|
their_para = %scheduled_core.para_id,
|
||||||
|
"core is not assigned to our para. Keep going.",
|
||||||
|
);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -233,7 +254,17 @@ async fn handle_new_activations<Context: SubsystemContext>(
|
|||||||
.await??
|
.await??
|
||||||
{
|
{
|
||||||
Some(v) => v,
|
Some(v) => v,
|
||||||
None => continue,
|
None => {
|
||||||
|
tracing::trace!(
|
||||||
|
target: LOG_TARGET,
|
||||||
|
core_idx = %core_idx,
|
||||||
|
relay_parent = ?relay_parent,
|
||||||
|
our_para = %config.para_id,
|
||||||
|
their_para = %scheduled_core.para_id,
|
||||||
|
"validation data is not available",
|
||||||
|
);
|
||||||
|
continue
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
let task_config = config.clone();
|
let task_config = config.clone();
|
||||||
|
|||||||
Reference in New Issue
Block a user