Skip to content
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