Skip to content

Commit

Permalink
Set receive exit signal log from debug to info
Browse files Browse the repository at this point in the history
  • Loading branch information
eval-exec committed Oct 31, 2023
1 parent 4a6fac8 commit d4f8c81
Show file tree
Hide file tree
Showing 13 changed files with 24 additions and 24 deletions.
4 changes: 2 additions & 2 deletions block-filter/src/filter.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use ckb_async_runtime::tokio::{self, task::block_in_place};
use ckb_logger::{debug, warn};
use ckb_logger::{debug, info, warn};
use ckb_shared::Shared;
use ckb_stop_handler::{new_tokio_exit_rx, CancellationToken};
use ckb_store::{ChainDB, ChainStore};
Expand Down Expand Up @@ -63,7 +63,7 @@ impl BlockFilter {
new_block_watcher.borrow_and_update();
}
_ = stop_rx.cancelled() => {
debug!("BlockFilter received exit signal, exit now");
info!("BlockFilter received exit signal, exit now");
break
},
else => break,
Expand Down
2 changes: 1 addition & 1 deletion chain/src/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ impl ChainService {
},
},
recv(signal_receiver) -> _ => {
debug!("ChainService received exit signal, exit now");
info!("ChainService received exit signal, exit now");
unverified_queue_stop_tx.send(());
search_orphan_pool_stop_tx.send(());

Expand Down
2 changes: 1 addition & 1 deletion ckb-bin/src/helper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pub fn deadlock_detection() {

},
recv(stop_rx) -> _ =>{
debug!("deadlock_detection received exit signal, stopped");
info!("deadlock_detection received exit signal, stopped");
return;
}
}
Expand Down
8 changes: 4 additions & 4 deletions miner/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use ckb_app_config::MinerClientConfig;
use ckb_async_runtime::Handle;
use ckb_channel::Sender;
use ckb_jsonrpc_types::{Block as JsonBlock, BlockTemplate};
use ckb_logger::{debug, error};
use ckb_logger::{debug, error, info};
use ckb_stop_handler::{new_tokio_exit_rx, CancellationToken};
use ckb_types::{
packed::{Block, Byte32},
Expand Down Expand Up @@ -87,7 +87,7 @@ impl Rpc {
});
},
_ = stop_rx.cancelled() => {
debug!("Rpc server received exit signal, exit now");
info!("Rpc server received exit signal, exit now");
break
},
else => break
Expand Down Expand Up @@ -235,7 +235,7 @@ Otherwise ckb-miner does not work properly and will behave as it stopped committ
let stop_rx: CancellationToken = new_tokio_exit_rx();
let graceful = server.with_graceful_shutdown(async move {
stop_rx.cancelled().await;
debug!("Miner client received exit signal, exit now");
info!("Miner client received exit signal, exit now");
});

if let Err(e) = graceful.await {
Expand All @@ -255,7 +255,7 @@ Otherwise ckb-miner does not work properly and will behave as it stopped committ
self.fetch_block_template().await;
}
_ = stop_rx.cancelled() => {
debug!("Miner client pool_block_template received exit signal, exit now");
info!("Miner client pool_block_template received exit signal, exit now");
break
},
else => break,
Expand Down
2 changes: 1 addition & 1 deletion miner/src/miner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ impl Miner {
},
},
recv(stop_rx) -> _msg => {
debug!("miner received exit signal, stopped");
info!("miner received exit signal, stopped");
break;
}
};
Expand Down
4 changes: 2 additions & 2 deletions notify/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! TODO(doc): @quake
use ckb_app_config::NotifyConfig;
use ckb_async_runtime::Handle;
use ckb_logger::{debug, error, trace};
use ckb_logger::{debug, error, info, trace};
use ckb_stop_handler::{new_tokio_exit_rx, CancellationToken};
use ckb_types::packed::Byte32;
use ckb_types::{
Expand Down Expand Up @@ -178,7 +178,7 @@ impl NotifyService {
Some(msg) = network_alert_register_receiver.recv() => { self.handle_register_network_alert(msg) },
Some(msg) = network_alert_receiver.recv() => { self.handle_notify_network_alert(msg) },
_ = signal_receiver.cancelled() => {
debug!("NotifyService received exit signal, exit now");
info!("NotifyService received exit signal, exit now");
break;
}
else => break,
Expand Down
4 changes: 2 additions & 2 deletions shared/src/types/header_map/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use ckb_async_runtime::Handle;
use ckb_logger::debug;
use ckb_logger::{debug, info};
use ckb_stop_handler::{new_tokio_exit_rx, CancellationToken};
use ckb_types::packed::Byte32;
use std::sync::Arc;
Expand Down Expand Up @@ -58,7 +58,7 @@ impl HeaderMap {
debug!("HeaderMap limit_memory cost: {:?}", now.elapsed());
}
_ = stop_rx.cancelled() => {
debug!("HeaderMap limit_memory received exit signal, exit now");
info!("HeaderMap limit_memory received exit signal, exit now");
break
},
}
Expand Down
2 changes: 1 addition & 1 deletion sync/src/synchronizer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ impl BlockFetchCMD {
}
}
recv(stop_signal) -> _ => {
debug!("thread BlockDownload received exit signal, exit now");
info!("thread BlockDownload received exit signal, exit now");
return;
}
}
Expand Down
4 changes: 2 additions & 2 deletions tx-pool/src/chunk_process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use crate::try_or_return_with_snapshot;
use crate::{error::Reject, service::TxPoolService};
use ckb_chain_spec::consensus::Consensus;
use ckb_error::Error;
use ckb_logger::debug;
use ckb_logger::{debug, info};
use ckb_snapshot::Snapshot;
use ckb_store::data_loader_wrapper::AsDataLoader;
use ckb_traits::{CellDataProvider, ExtensionProvider, HeaderProvider};
Expand Down Expand Up @@ -85,7 +85,7 @@ impl ChunkProcess {
}
},
_ = self.signal.cancelled() => {
debug!("TxPool received exit signal, exit now");
info!("TxPool received exit signal, exit now");
break
},
else => break,
Expand Down
6 changes: 3 additions & 3 deletions tx-pool/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ impl TxPoolServiceBuilder {
block_assembler::process(service_clone, &message).await;
},
_ = signal_receiver.cancelled() => {
debug!("TxPool received exit signal, exit now");
info!("TxPool received exit signal, exit now");
break
},
else => break,
Expand Down Expand Up @@ -574,7 +574,7 @@ impl TxPoolServiceBuilder {
queue.clear();
}
_ = signal_receiver.cancelled() => {
debug!("TxPool received exit signal, exit now");
info!("TxPool received exit signal, exit now");
break
},
else => break,
Expand Down Expand Up @@ -612,7 +612,7 @@ impl TxPoolServiceBuilder {
service.update_block_assembler_after_tx_pool_reorg().await;
},
_ = signal_receiver.cancelled() => {
debug!("TxPool received exit signal, exit now");
info!("TxPool received exit signal, exit now");
break
},
else => break,
Expand Down
4 changes: 2 additions & 2 deletions util/indexer/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ impl IndexerService {
}
}
_ = stop.cancelled() => {
debug!("Indexer received exit signal, exit now");
info!("Indexer received exit signal, exit now");
break
},
else => break,
Expand Down Expand Up @@ -204,7 +204,7 @@ impl IndexerService {
}
}
_ = stop.cancelled() => {
debug!("Indexer received exit signal, exit now");
info!("Indexer received exit signal, exit now");
break
},
}
Expand Down
4 changes: 2 additions & 2 deletions util/metrics-service/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use hyper::{
use prometheus::Encoder as _;

use ckb_async_runtime::Handle;
use ckb_logger::debug;
use ckb_logger::info;
use ckb_metrics_config::{Config, Exporter, Target};
use ckb_stop_handler::{new_tokio_exit_rx, CancellationToken};
use ckb_util::strings;
Expand Down Expand Up @@ -66,7 +66,7 @@ fn run_exporter(exporter: Exporter, handle: &Handle) -> Result<(), String> {
.with_graceful_shutdown(async {
let exit_rx: CancellationToken = new_tokio_exit_rx();
exit_rx.cancelled().await;
debug!("prometheus server received exit signal, exit now");
info!("prometheus server received exit signal, exit now");
});
if let Err(err) = server.await {
ckb_logger::error!("prometheus server error: {}", err);
Expand Down
2 changes: 1 addition & 1 deletion util/stop-handler/src/stop_register.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pub fn wait_all_ckb_services_exit() {
}
}
}
debug!("all ckb threads have been stopped");
info!("all ckb threads have been stopped");
}

static CKB_HANDLES: once_cell::sync::Lazy<Mutex<CkbServiceHandles>> =
Expand Down

0 comments on commit d4f8c81

Please sign in to comment.