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

reset replica when injector detects potential corruption #947

Merged
merged 2 commits into from
Feb 2, 2024

Conversation

MarinPostma
Copy link
Contributor

When we detect an error from the injector, we threat it a potential corruption, and reset the replica.

@MarinPostma MarinPostma force-pushed the replication-corruption branch from 9de4fc1 to 8766c09 Compare January 26, 2024 18:08
Copy link
Contributor

@psarna psarna left a 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

@@ -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) {
Copy link
Contributor

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!();
Copy link
Contributor

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},
Copy link
Contributor

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?

@MarinPostma MarinPostma force-pushed the replication-corruption branch from 8766c09 to e631973 Compare February 1, 2024 12:20
@MarinPostma MarinPostma force-pushed the replication-corruption branch from e631973 to 860deb3 Compare February 1, 2024 12:28
@MarinPostma MarinPostma enabled auto-merge February 1, 2024 12:28
@MarinPostma MarinPostma added this pull request to the merge queue Feb 2, 2024
Merged via the queue into main with commit c659eb2 Feb 2, 2024
12 checks passed
@MarinPostma MarinPostma deleted the replication-corruption branch February 2, 2024 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants