From 188a85907d8b8d9ab9d62113e63830948573ef79 Mon Sep 17 00:00:00 2001 From: Robert Habermeier Date: Thu, 19 Aug 2021 23:36:58 +0200 Subject: [PATCH 1/2] demote warnings due to disconnected dispute coordinator --- node/core/approval-voting/src/lib.rs | 2 +- node/core/backing/src/lib.rs | 2 +- node/network/dispute-distribution/src/receiver/error.rs | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/node/core/approval-voting/src/lib.rs b/node/core/approval-voting/src/lib.rs index 86dbd7148559..436fa8ff6e7f 100644 --- a/node/core/approval-voting/src/lib.rs +++ b/node/core/approval-voting/src/lib.rs @@ -920,7 +920,7 @@ async fn handle_actions( match confirmation_rx.await { Err(oneshot::Canceled) => { - tracing::warn!(target: LOG_TARGET, "Dispute coordinator confirmation lost",) + tracing::debug!(target: LOG_TARGET, "Dispute coordinator confirmation lost",) }, Ok(ImportStatementsResult::ValidImport) => {}, Ok(ImportStatementsResult::InvalidImport) => tracing::warn!( diff --git a/node/core/backing/src/lib.rs b/node/core/backing/src/lib.rs index a01fe77b2bff..5ed80017e7d9 100644 --- a/node/core/backing/src/lib.rs +++ b/node/core/backing/src/lib.rs @@ -901,7 +901,7 @@ impl CandidateBackingJob { match confirmation_rx.await { Err(oneshot::Canceled) => - tracing::warn!(target: LOG_TARGET, "Dispute coordinator confirmation lost",), + tracing::debug!(target: LOG_TARGET, "Dispute coordinator confirmation lost",), Ok(ImportStatementsResult::ValidImport) => {}, Ok(ImportStatementsResult::InvalidImport) => tracing::warn!(target: LOG_TARGET, "Failed to import statements of validity",), diff --git a/node/network/dispute-distribution/src/receiver/error.rs b/node/network/dispute-distribution/src/receiver/error.rs index e9c92f171dd3..8c099e87fafb 100644 --- a/node/network/dispute-distribution/src/receiver/error.rs +++ b/node/network/dispute-distribution/src/receiver/error.rs @@ -106,6 +106,10 @@ pub type NonFatalResult = std::result::Result; pub fn log_error(result: Result<()>) -> std::result::Result<(), Fatal> { match result { Err(Error::Fatal(f)) => Err(f), + Err(Error::NonFatal(error @ NonFatal::ImportCanceled(_))) => { + tracing::debug!(target: LOG_TARGET, error = ?error); + Ok(()) + } Err(Error::NonFatal(error)) => { tracing::warn!(target: LOG_TARGET, error = ?error); Ok(()) From 3decaefc334510ade646b7c616a1c82209774076 Mon Sep 17 00:00:00 2001 From: Robert Klotzner Date: Fri, 20 Aug 2021 11:55:01 +0200 Subject: [PATCH 2/2] cargo fmt --- node/network/dispute-distribution/src/receiver/error.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node/network/dispute-distribution/src/receiver/error.rs b/node/network/dispute-distribution/src/receiver/error.rs index 8c099e87fafb..bde8899494dc 100644 --- a/node/network/dispute-distribution/src/receiver/error.rs +++ b/node/network/dispute-distribution/src/receiver/error.rs @@ -109,7 +109,7 @@ pub fn log_error(result: Result<()>) -> std::result::Result<(), Fatal> { Err(Error::NonFatal(error @ NonFatal::ImportCanceled(_))) => { tracing::debug!(target: LOG_TARGET, error = ?error); Ok(()) - } + }, Err(Error::NonFatal(error)) => { tracing::warn!(target: LOG_TARGET, error = ?error); Ok(())