Skip to content

Commit

Permalink
[Simtest] adjust log levels for a few messages (MystenLabs#17376)
Browse files Browse the repository at this point in the history
## Description 

- Reduce the severity of some error logs, which seem a bit noisy in
simtests.
- Log receiving checkpoint from state sync at info level, to make
debugging simtest panic easier.

## Test plan 

CI

---

## Release notes

Check each box that your changes affect. If none of the boxes relate to
your changes, release notes aren't required.

For each box you select, include information after the relevant heading
that describes the impact of your changes that a user might notice and
any actions they must take to implement updates.

- [ ] Protocol: 
- [ ] Nodes (Validators and Full nodes): 
- [ ] Indexer: 
- [ ] JSON-RPC: 
- [ ] GraphQL: 
- [ ] CLI: 
- [ ] Rust SDK:
  • Loading branch information
mwtian authored Apr 28, 2024
1 parent 227672e commit 5c89ccb
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
4 changes: 2 additions & 2 deletions crates/sui-benchmark/src/workloads/shared_object_deletion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use sui_types::{
base_types::{ObjectDigest, ObjectID, SequenceNumber},
transaction::Transaction,
};
use tracing::{debug, error, info};
use tracing::{debug, info, warn};

/// The max amount of gas units needed for a payload.
pub const MAX_GAS_IN_UNIT: u64 = 1_000_000_000;
Expand All @@ -50,7 +50,7 @@ impl Payload for SharedCounterDeletionTestPayload {
fn make_new_payload(&mut self, effects: &ExecutionEffects) {
if !effects.is_ok() && !self.is_counter_deleted {
effects.print_gas_summary();
error!("Shared counter deletion tx failed...");
warn!("Shared counter deletion tx failed: {}", effects.status());
}

self.gas.0 = effects.gas_object().0;
Expand Down
4 changes: 3 additions & 1 deletion crates/sui-core/src/authority_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,9 @@ macro_rules! handle_with_decoration {
// is hitting this case, we should reject such requests that
// hit this case.
if connection_ip.is_none() {
if cfg!(all(test, not(msim))) {
if cfg!(msim) {
// Ignore the error from simtests.
} else if cfg!(test) {
panic!("Failed to get remote address from request");
} else {
$self.metrics.connection_ip_not_found.inc();
Expand Down
4 changes: 2 additions & 2 deletions crates/sui-core/src/checkpoints/checkpoint_executor/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -314,9 +314,9 @@ impl CheckpointExecutor {
fail_point!("cp_exec_scheduling_timeout_reached");
},
Ok(Ok(checkpoint)) => {
debug!(
info!(
sequence_number = ?checkpoint.sequence_number,
"received checkpoint summary from state sync"
"Received checkpoint summary from state sync"
);
checkpoint.report_checkpoint_age_ms(&self.metrics.checkpoint_contents_age_ms);
},
Expand Down
6 changes: 5 additions & 1 deletion narwhal/executor/src/subscriber.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ use network::client::NetworkClient;
use std::collections::HashMap;
use std::collections::HashSet;
use std::{sync::Arc, time::Duration, vec};
use tracing::warn;
use types::error::LocalClientError;
use types::FetchBatchesRequest;

use fastcrypto::hash::Hash;
Expand Down Expand Up @@ -366,7 +368,9 @@ impl Subscriber {
{
Ok(resp) => break resp.batches,
Err(e) => {
error!("Failed to fetch batches from worker {worker_name}: {e:?}");
if !matches!(e, LocalClientError::ShuttingDown) {
warn!("Failed to fetch batches from worker {worker_name}: {e:?}");
}
// Loop forever on failure. During shutdown, this should get cancelled.
tokio::time::sleep(Duration::from_secs(1)).await;
continue;
Expand Down

0 comments on commit 5c89ccb

Please sign in to comment.