Skip to content

Commit

Permalink
Make the compaction warning more tolerant
Browse files Browse the repository at this point in the history
  • Loading branch information
arpad-m committed Aug 18, 2023
1 parent 64fc7ea commit 415f49d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pageserver/src/tenant/timeline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3778,7 +3778,10 @@ impl Timeline {
// Sync layers
if !new_layers.is_empty() {
// Print a warning if the created layer is larger than double the target size
let warn_limit = target_file_size * 2;
// Add two pages for potential overhead. This should in theory be already
// accounted for in the target calculation, but for very small targets,
// we still might easily hit the limit otherwise.
let warn_limit = target_file_size * 2 + page_cache::PAGE_SZ as u64 * 2;
for layer in new_layers.iter() {
if layer.desc.file_size > warn_limit {
warn!(
Expand Down

0 comments on commit 415f49d

Please sign in to comment.