-
Notifications
You must be signed in to change notification settings - Fork 506
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
[Merged by Bors] - feat: fail fast if socket is stale #3054
Conversation
/// send and wait for reply serially | ||
#[instrument(level = "trace", skip(self, request))] | ||
pub async fn send_receive<R>(&self, request: R) -> Result<R::Response, SocketError> | ||
where | ||
R: Request + Send + Sync, | ||
{ | ||
if self.is_stale() { | ||
return Err(SocketError::SocketStale); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should handle this on Fluvio and FluvioAdmin and call reconnect
if happens
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's create issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added in #3059
/// send and wait for reply serially | ||
#[instrument(level = "trace", skip(self, request))] | ||
pub async fn send_receive<R>(&self, request: R) -> Result<R::Response, SocketError> | ||
where | ||
R: Request + Send + Sync, | ||
{ | ||
if self.is_stale() { | ||
return Err(SocketError::SocketStale); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely
/// send and wait for reply serially | ||
#[instrument(level = "trace", skip(self, request))] | ||
pub async fn send_receive<R>(&self, request: R) -> Result<R::Response, SocketError> | ||
where | ||
R: Request + Send + Sync, | ||
{ | ||
if self.is_stale() { | ||
return Err(SocketError::SocketStale); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's create issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
bors r+ |
Right now if socket is stale, we get this error after 300 seconds: ``` Io { source: Custom { kind: TimedOut, error: "Timed out: 300 secs waiting for response. API_KEY=1003, CorrelationId=27", }, msg: "", }, ``` This fail fast is a socket stale is detected.
Pull request successfully merged into master. Build succeeded: |
Right now if socket is stale, we get this error after 300 seconds:
This fail fast is a socket stale is detected.