Skip to content

Commit

Permalink
fix: do not handle irrelevant errors
Browse files Browse the repository at this point in the history
  • Loading branch information
crepererum committed Jan 14, 2022
1 parent 200df6a commit 65161d6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/client/controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,16 @@ impl ControllerClient {
};

match error {
// broken connection
Error::Request(RequestError::Poisoned(_) | RequestError::IO(_))
| Error::Connection(_) => self.invalidate_cached_controller_broker().await,
Error::ServerError(ProtocolError::LeaderNotAvailable, _) => {}
Error::ServerError(ProtocolError::OffsetNotAvailable, _) => {}

// our broker is actually not the controller
Error::ServerError(ProtocolError::NotController, _) => {
self.invalidate_cached_controller_broker().await;
}

// fatal
_ => {
error!(
e=%error,
Expand Down

0 comments on commit 65161d6

Please sign in to comment.