Skip to content

Commit a86d3c1

Browse files
committed
sqld: temp fix replica namespace doesnt exist
1 parent 0916848 commit a86d3c1

File tree

1 file changed

+11
-4
lines changed
  • libsql-server/src/namespace/configurator

1 file changed

+11
-4
lines changed

libsql-server/src/namespace/configurator/replica.rs

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,17 @@ impl ConfigureNamespace for ReplicaConfigurator {
123123
loop {
124124
match replicator.run().await {
125125
err @ Error::Fatal(_) => Err(err)?,
126-
err @ Error::NamespaceDoesntExist => {
127-
tracing::error!("namespace {namespace} doesn't exist, destroying...");
128-
(reset)(ResetOp::Destroy(namespace.clone()));
129-
Err(err)?;
126+
_err @ Error::NamespaceDoesntExist => {
127+
// TODO(lucio): there is a bug where a primary will report that a valid
128+
// namespace doesn't exist when it does and causes the replicate to
129+
// destroy the namespace locally. For now the temp solution is to
130+
// ignore this error (still log it) and don't destroy the local
131+
// namespace data on the replica. This trades off storage space for
132+
// returing 500s.
133+
tracing::error!("namespace {namespace} doesn't exist, trying to replicate again...");
134+
// tracing::error!("namespace {namespace} doesn't exist, destroying...");
135+
// (reset)(ResetOp::Destroy(namespace.clone()));
136+
// Err(err)?;
130137
}
131138
e @ Error::Injector(_) => {
132139
tracing::error!("potential corruption detected while replicating, reseting replica: {e}");

0 commit comments

Comments
 (0)