Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force protocol type to RequestResponse if suspension_timeout is zero. #479

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions src/invoker/src/invocation_task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -320,12 +320,18 @@ where
// Check all the entries have been replayed
debug_assert_eq!(self.next_journal_index, journal_size);

// Force protocol type to RequestResponse if suspension_timeout is zero
let protocol_type = if self.suspension_timeout.is_zero() {
ProtocolType::RequestResponse
} else {
self.endpoint_metadata.protocol_type()
};

// If we have the invoker_rx and the protocol type is bidi stream,
// then we can use the bidi_stream loop reading the invoker_rx and the http_stream_rx
if let (Some(invoker_rx), ProtocolType::BidiStream) = (
self.invoker_rx.take(),
self.endpoint_metadata.protocol_type(),
) {
if let (Some(invoker_rx), ProtocolType::BidiStream) =
(self.invoker_rx.take(), protocol_type)
{
shortcircuit!(
self.bidi_stream_loop(
&service_invocation_span_context,
Expand Down