-
Notifications
You must be signed in to change notification settings - Fork 352
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
reset replica when injector detects potential corruption #947
Conversation
9de4fc1
to
8766c09
Compare
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.
sounds reasonable, needs some cleanup and a cargo fmt
though
libsql-replication/src/replicator.rs
Outdated
@@ -201,7 +201,7 @@ impl<C: ReplicatorClient> Replicator<C> { | |||
let mut error_printed = false; | |||
for _ in 0..HANDSHAKE_MAX_RETRIES { | |||
tracing::info!("Attempting to perform handshake with primary."); | |||
match self.client.handshake().await { | |||
match dbg!(self.client.handshake().await) { |
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.
stray dbg!
@@ -466,7 +466,9 @@ impl Connection for WriteProxyConnection<RpcStream> { | |||
) -> Result<B> { | |||
let mut state = self.state.lock().await; | |||
|
|||
dbg!(); |
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.
and here, and in a couple more places
rpc::replication::{Frame, HelloRequest, HelloResponse, LogOffset}, | ||
}; | ||
use libsql_server::{ | ||
config::{AdminApiConfig, DbConfig, RpcClientConfig, RpcServerConfig}, |
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.
wait, all those headers were missing? Or is it the IDE getting too eager with fixing dependencies?
8766c09
to
e631973
Compare
e631973
to
860deb3
Compare
When we detect an error from the injector, we threat it a potential corruption, and reset the replica.