doc: explain "bug" message, log layers

This commit is contained in:
Joonas Koivunen
2023-03-28 11:47:12 +03:00
committed by Joonas Koivunen
parent 03ab5df081
commit 75759f709f

View File

@@ -538,9 +538,14 @@ async fn extend_lru_candidates(
match tenant.get_min_resident_size_override().or(max_layer_size) {
Some(size) => size,
None => {
// the tenant has no layers at all. it's very unlikely but allowed by the
// types.
if !scratch.is_empty() {
// soft assert
warn!("BUG: no maximum layer size, but still found layers");
warn!(
layers = scratch.len(),
"BUG: no maximum layer size, but still found layers"
);
scratch.clear();
}
return ControlFlow::Continue(());