Skip to content

Commit fc5254f

Browse files
committed
namespace: print cache eviction reason in debug logs
1 parent 044bd0e commit fc5254f

File tree

1 file changed

+3
-2
lines changed
  • libsql-server/src/namespace

1 file changed

+3
-2
lines changed

libsql-server/src/namespace/mod.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -386,9 +386,10 @@ impl<M: MakeNamespace> NamespaceStore<M> {
386386
meta_store_path: impl AsRef<Path>,
387387
max_active_namespaces: usize,
388388
) -> Self {
389+
tracing::trace!("Max active namespaces: {max_active_namespaces}");
389390
let store = Cache::<NamespaceName, NamespaceEntry<M::Database>>::builder()
390-
.async_eviction_listener(move |name, ns, _| {
391-
tracing::info!("evicting namespace `{name}` asynchronously");
391+
.async_eviction_listener(move |name, ns, cause| {
392+
tracing::debug!("evicting namespace `{name}` asynchronously: {cause:?}");
392393
// TODO(sarna): not clear if we should snapshot-on-evict...
393394
// On the one hand, better to do so, because we have no idea
394395
// for how long we're evicting a namespace.

0 commit comments

Comments
 (0)