write operations optimized for less memory usage

This commit is contained in:
euzu
2025-12-11 19:50:31 +01:00
parent 1193fc2265
commit a522d2863b
11 changed files with 35 additions and 34 deletions
@@ -203,7 +203,7 @@ async fn process_series_info(
}
write_counter +=1;
// periodic flush to bound BufWriter memory
if write_counter <= FLUSH_INTERVAL {
if write_counter >= FLUSH_INTERVAL {
write_counter = 0;
if let Err(err) = wal_writer.flush() {
errors.push(notify_err!(format!("Failed periodic flush of wal content writer {err}")));