From 5805ef8479f13e2fdd5a482b1f5aa5eab39c0b23 Mon Sep 17 00:00:00 2001 From: Pietro Date: Tue, 4 Mar 2025 11:04:34 +0100 Subject: [PATCH] Addressed comments --- rs/execution_environment/src/scheduler.rs | 25 +++++++++-------------- rs/orchestrator/src/orchestrator.rs | 1 - 2 files changed, 10 insertions(+), 16 deletions(-) diff --git a/rs/execution_environment/src/scheduler.rs b/rs/execution_environment/src/scheduler.rs index 7d786b4ee20..846012bf0ac 100644 --- a/rs/execution_environment/src/scheduler.rs +++ b/rs/execution_environment/src/scheduler.rs @@ -29,7 +29,7 @@ use ic_replicated_state::{ num_bytes_try_from, page_map::PageAllocatorFileDescriptor, CanisterState, CanisterStatus, ExecutionTask, InputQueueType, NetworkTopology, NumWasmPages, - ReplicatedState, + ReplicatedState, StateError, }; use ic_system_api::InstructionLimits; use ic_types::{ @@ -1038,18 +1038,14 @@ impl SchedulerImpl { ) .map(|_| ()) .map_err(|(err, msg)| { - // Spamming a lot of logs even multiple per sec of this kind: - // Inducting Request(Request { receiver: CanisterId(7xpjo-2iaaa-aaaao-a2vxq-cai), - // sender: CanisterId(dtvyz-2iaaa-aaaao-a2xxq-cai), sender_reply_callback: 20791, - // payment: Cycles(0), method_name: "index", method_payload: "10 bytes;4449444c016d7b010000", - // metadata: RequestMetadata { call_tree_depth: 1, call_tree_start_time: Time(1737940399724249864) }, - // deadline: CoarseTime(0) }) on same subnet failed with error 'Canister 7xpjo-2iaaa-aaaao-a2vxq-cai is stopped'. - error!( - self.log, - "Inducting {:?} on same subnet failed with error '{}'.", - &msg, - &err - ); + if !matches!(err, StateError::CanisterStopped(_)) { + error!( + self.log, + "Inducting {:?} on same subnet failed with error '{}'.", + &msg, + &err + ); + } }), None => Err(()), } @@ -2032,8 +2028,7 @@ fn observe_replicated_state_metrics( // Log all old call contexts, but not (nearly) every round. if current_round.get() % SPAMMY_LOG_INTERVAL_ROUNDS == 0 { for (origin, origin_time) in &old_call_contexts { - // TODO: Demote it to INFO - warn!( + info!( logger, "Call context on canister {} with origin {:?} has been open for {:?}", canister.canister_id(), diff --git a/rs/orchestrator/src/orchestrator.rs b/rs/orchestrator/src/orchestrator.rs index 3f64606a1bb..85d8289cd36 100644 --- a/rs/orchestrator/src/orchestrator.rs +++ b/rs/orchestrator/src/orchestrator.rs @@ -131,7 +131,6 @@ impl Orchestrator { thread::sleep(Duration::from_secs(10 * 60)); let (ipv4, ipv6) = Self::get_ip_addresses(); - // TODO: group all newlines together currently split by newline let message = indoc::formatdoc!( r#" Node-id: {node_id}