Skip to content

Commit e4d7d9e

Browse files
comm: handle returned undeliverables explicitly (#417)
Summary: Pull Request resolved: #417 i failed to account for the possibility of a comm actor handling an undeliverable message return being returned. in any case, remove the `unreachable!()`; i think panics here can't be helpful. Reviewed By: amirafzali Differential Revision: D77688098 fbshipit-source-id: 48e4a85b1994f635e7f4921b3b94edd6c9873dc5
1 parent 0a24bba commit e4d7d9e

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

hyperactor_mesh/src/comm.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,12 @@ use hyperactor::PortRef;
2626
use hyperactor::WorldId;
2727
use hyperactor::data::Serialized;
2828
use hyperactor::mailbox::DeliveryError;
29+
use hyperactor::mailbox::MailboxSender;
30+
use hyperactor::mailbox::MessageEnvelope;
2931
use hyperactor::mailbox::Undeliverable;
32+
use hyperactor::mailbox::UndeliverableMailboxSender;
3033
use hyperactor::mailbox::UndeliverableMessageError;
34+
use hyperactor::mailbox::monitored_return_handle;
3135
use hyperactor::reference::UnboundPort;
3236
use ndslice::Slice;
3337
use ndslice::selection::routing::RoutingFrame;
@@ -199,7 +203,10 @@ impl Actor for CommActor {
199203
return Ok(());
200204
}
201205

202-
unreachable!()
206+
// 3. A return of an undeliverable message was itself returned.
207+
UndeliverableMailboxSender
208+
.post(message_envelope, /*unused */ monitored_return_handle());
209+
Ok(())
203210
}
204211
}
205212

0 commit comments

Comments
 (0)