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

sqld: temp fix replica namespace doesnt exist #1770

Merged
merged 1 commit into from
Oct 4, 2024
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
15 changes: 11 additions & 4 deletions libsql-server/src/namespace/configurator/replica.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,17 @@ impl ConfigureNamespace for ReplicaConfigurator {
loop {
match replicator.run().await {
err @ Error::Fatal(_) => Err(err)?,
err @ Error::NamespaceDoesntExist => {
tracing::error!("namespace {namespace} doesn't exist, destroying...");
(reset)(ResetOp::Destroy(namespace.clone()));
Err(err)?;
_err @ Error::NamespaceDoesntExist => {
// TODO(lucio): there is a bug where a primary will report that a valid
// namespace doesn't exist when it does and causes the replicate to
// destroy the namespace locally. For now the temp solution is to
// ignore this error (still log it) and don't destroy the local
// namespace data on the replica. This trades off storage space for
// returing 500s.
tracing::error!("namespace {namespace} doesn't exist, trying to replicate again...");
// tracing::error!("namespace {namespace} doesn't exist, destroying...");
// (reset)(ResetOp::Destroy(namespace.clone()));
// Err(err)?;
}
e @ Error::Injector(_) => {
tracing::error!("potential corruption detected while replicating, reseting replica: {e}");
Expand Down
Loading