Skip to content

Commit e67031c

Browse files
committed
chore(reader): demote SystemPackageTask error! logs to warn!-s
## Description We typically reserve `error!` for messages related to situations that the system does not know how to recover from, but the `error!` logs in the system package task are related to issues that it is attempting to recover from through retries, so they should really be `warn!` logs. ## Test plan :eyes:
1 parent 3f0ca29 commit e67031c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

crates/sui-indexer-alt-reader/src/system_package_task.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use move_core_types::account_address::AccountAddress;
1111
use sui_futures::service::Service;
1212
use sui_sql_macro::query;
1313
use tokio::time;
14-
use tracing::{error, info};
14+
use tracing::{info, warn};
1515

1616
use crate::{package_resolver::PackageCache, pg_reader::PgReader};
1717

@@ -76,7 +76,7 @@ impl SystemPackageTask {
7676
let mut conn = match pg_reader.connect().await {
7777
Ok(conn) => conn,
7878
Err(e) => {
79-
error!("Failed to connect to database: {:?}", e);
79+
warn!("Failed to connect to database: {:?}", e);
8080
continue;
8181
}
8282
};
@@ -114,12 +114,12 @@ impl SystemPackageTask {
114114
}
115115

116116
Ok(_) => {
117-
error!("Expected exactly one row from the watermarks table");
117+
warn!("Expected exactly one row from the watermarks table");
118118
continue;
119119
}
120120

121121
Err(e) => {
122-
error!("Failed to fetch latest epoch: {e}");
122+
warn!("Failed to fetch latest epoch: {e}");
123123
continue;
124124
}
125125
};
@@ -154,7 +154,7 @@ impl SystemPackageTask {
154154
Ok(system_packages) => system_packages,
155155

156156
Err(e) => {
157-
error!("Failed to fetch system packages: {e}");
157+
warn!("Failed to fetch system packages: {e}");
158158
continue;
159159
}
160160
};
@@ -164,7 +164,7 @@ impl SystemPackageTask {
164164
.map(|pkg| AccountAddress::from_bytes(pkg.original_id))
165165
.collect::<Result<Vec<_>, _>>()
166166
else {
167-
error!("Failed to deserialize system package addresses");
167+
warn!("Failed to deserialize system package addresses");
168168
continue;
169169
};
170170

0 commit comments

Comments
 (0)