Skip to content

Commit eb2aeca

Browse files
pzhan9meta-codesync[bot]
authored andcommitted
improve logs (#1887)
Summary: Pull Request resolved: #1887 This diff does 2 changes: 1. downgrade a `warn` to `info` since that message is more a fyi, rather than asking the user to do something. 2. include `MESSAGE_DELIVERY_TIMEOUT` value in the error message. Reviewed By: mariusae Differential Revision: D86974138 fbshipit-source-id: 50415265d6cfb2d11b7b383eb8e7596d72626957
1 parent 82d9cd1 commit eb2aeca

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

hyperactor/src/channel/net.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2093,9 +2093,9 @@ mod tests {
20932093

20942094
// Verify the channel is closed due to ack timeout based on the log.
20952095
let expected_log: &str = if disconnect_before_ack {
2096-
"failed to receive ack within timeout 2 secs; link is currently broken"
2096+
"failed to receive ack within timeout 2s; link is currently broken"
20972097
} else {
2098-
"failed to receive ack within timeout 2 secs; link is currently connected"
2098+
"failed to receive ack within timeout 2s; link is currently connected"
20992099
};
21002100

21012101
verify_tx_closed(&mut tx_status, expected_log).await;

hyperactor/src/channel/net/client.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -937,8 +937,8 @@ where
937937
// If acking message takes too long, consider the link broken.
938938
_ = unacked.wait_for_timeout(), if !unacked.is_empty() => {
939939
let error_msg = format!(
940-
"{log_id}: failed to receive ack within timeout {} secs; link is currently connected",
941-
config::global::get(config::MESSAGE_DELIVERY_TIMEOUT).as_secs(),
940+
"{log_id}: failed to receive ack within timeout {:?}; link is currently connected",
941+
config::global::get(config::MESSAGE_DELIVERY_TIMEOUT),
942942
);
943943
tracing::error!(error_msg);
944944
(State::Closing {
@@ -1025,7 +1025,10 @@ where
10251025
// If delivering this message is taking too long,
10261026
// consider the link broken.
10271027
if outbox.is_expired() {
1028-
let error_msg = format!("{log_id}: failed to deliver message within timeout");
1028+
let error_msg = format!(
1029+
"{log_id}: failed to deliver message within timeout {:?}",
1030+
config::global::get(config::MESSAGE_DELIVERY_TIMEOUT)
1031+
);
10291032
tracing::error!(error_msg);
10301033
(
10311034
State::Closing {
@@ -1036,8 +1039,8 @@ where
10361039
)
10371040
} else if unacked.is_expired() {
10381041
let error_msg = format!(
1039-
"{log_id}: failed to receive ack within timeout {} secs; link is currently broken",
1040-
config::global::get(config::MESSAGE_DELIVERY_TIMEOUT).as_secs(),
1042+
"{log_id}: failed to receive ack within timeout {:?}; link is currently broken",
1043+
config::global::get(config::MESSAGE_DELIVERY_TIMEOUT),
10411044
);
10421045
tracing::error!(error_msg);
10431046
(

hyperactor_mesh/src/alloc/process.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ impl ProcessAlloc {
454454

455455
// We don't support FileAppender in this v0 allocator path; warn if asked.
456456
if enable_file_capture {
457-
tracing::warn!(
457+
tracing::info!(
458458
"MESH_ENABLE_FILE_CAPTURE=true, but ProcessAllocator (v0) has no FileAppender; \
459459
files will NOT be written in this path"
460460
);

0 commit comments

Comments
 (0)