raise the warning for oversized L0 to 2*target (#7985)

currently we warn even by going over a single byte. even that will be
hit much more rarely once #7927 lands, but get this in earlier.

rationale for 2*checkpoint_distance: anything smaller is not really
worth a warn.

we have an global allowed_error for this warning, which still cannot be
removed nor can it be removed with #7927 because of many tests with very
small `checkpoint_distance`.
This commit is contained in:
Joonas Koivunen
2024-06-06 20:18:39 +03:00
committed by GitHub
parent 5d05013857
commit d46d19456d

View File

@@ -5678,7 +5678,7 @@ impl<'a> TimelineWriter<'a> {
self.tl.flush_frozen_layers();
let current_size = self.write_guard.as_ref().unwrap().current_size;
if current_size > self.get_checkpoint_distance() {
if current_size >= self.get_checkpoint_distance() * 2 {
warn!("Flushed oversized open layer with size {}", current_size)
}