diff --git a/coerce/src/remote/cluster/singleton/manager/lease.rs b/coerce/src/remote/cluster/singleton/manager/lease.rs index 1c297c0..d44783a 100644 --- a/coerce/src/remote/cluster/singleton/manager/lease.rs +++ b/coerce/src/remote/cluster/singleton/manager/lease.rs @@ -79,14 +79,14 @@ pub struct LeaseNack { impl Handler for Manager { async fn handle(&mut self, message: RequestLease, ctx: &mut ActorContext) { if !self.state.is_running() { - info!( + debug!( source_node_id = message.source_node_id, "received RequestLease" ); self.grant_lease(message.source_node_id, ctx).await; } else { - info!( + debug!( node_id = self.node_id, singleton = F::Actor::type_name(), "singleton already running, stopping", @@ -110,17 +110,21 @@ impl Manager { source_node_id: self.node_id, }; - info!(source_node_id = self.node_id, "requesting lease"); + debug!(source_node_id = self.node_id, "requesting lease"); self.notify_managers(request, ctx).await; } pub async fn grant_lease(&mut self, node_id: NodeId, ctx: &ActorContext) { - info!(target_node_id = node_id, "sending LeaseAck"); + debug!(target_node_id = node_id, "sending LeaseAck"); match &mut self.state { State::Joining { acknowledgement_pending, } => { + debug!( + target_node_id = node_id, + "manager still joining, buffering acknowledgement until `MemberUp` received" + ); acknowledgement_pending.replace(node_id); } @@ -144,8 +148,8 @@ impl Manager { info!( source_node_id = node_id, - "received LeaseAck, total_acknowledgements={}", - acknowledged_nodes.len() + total_acknowledgements = acknowledged_nodes.len(), + "received LeaseAck", ); // TODO: Can we do it with a quorum rather than *all managers*? @@ -166,7 +170,7 @@ impl Manager { } pub async fn on_all_managers_acknowledged(&mut self, ctx: &ActorContext) { - info!(node_id = self.node_id, "starting singleton"); + debug!(node_id = self.node_id, "starting singleton"); self.start_actor(ctx).await; } diff --git a/coerce/src/remote/cluster/singleton/manager/mod.rs b/coerce/src/remote/cluster/singleton/manager/mod.rs index f484c34..bd16827 100644 --- a/coerce/src/remote/cluster/singleton/manager/mod.rs +++ b/coerce/src/remote/cluster/singleton/manager/mod.rs @@ -175,7 +175,7 @@ impl Manager { ) where Self: Handler, { - info!( + debug!( source_node_id = self.node_id, node_id = manager.node_id(), message = M::type_name(), @@ -242,7 +242,7 @@ impl Actor for Manager { let sys = ctx.system().remote(); self.current_leader_node = sys.current_leader(); - info!( + debug!( node_id = self.node_id, singleton = F::Actor::type_name(), "manager started" @@ -299,6 +299,12 @@ impl Handler> for Manager { _ => {} } + debug!( + leader = leader, + nodes_len = nodes.len(), + "manager received `MemberUp`" + ); + for node in nodes { if node.id == self.node_id || !self.selector.includes(node.as_ref()) { continue; @@ -374,7 +380,7 @@ pub struct SingletonStopped { #[async_trait] impl Handler for Manager { async fn handle(&mut self, message: SingletonStarted, ctx: &mut ActorContext) { - info!( + debug!( source_node_id = message.source_node_id, "received started notification, notifying proxy" ); @@ -393,7 +399,7 @@ impl Handler for Manager { #[async_trait] impl Handler for Manager { async fn handle(&mut self, message: SingletonStopped, ctx: &mut ActorContext) { - info!( + debug!( source_node_id = message.source_node_id, "received stopped notification, notifying proxy" ); diff --git a/coerce/src/remote/cluster/singleton/manager/start.rs b/coerce/src/remote/cluster/singleton/manager/start.rs index 96bd47e..a5521ca 100644 --- a/coerce/src/remote/cluster/singleton/manager/start.rs +++ b/coerce/src/remote/cluster/singleton/manager/start.rs @@ -38,7 +38,7 @@ impl Handler> for Manager { ActorStartResult::Started(actor_ref) => { match &self.state { State::Starting { .. } => { - info!("singleton actor started"); + debug!("singleton actor started"); } _ => { warn!("Invalid state, expected `Starting`");