diff --git a/architecture/METRIC_COMPACTION_ROUTINE.md b/architecture/METRIC_COMPACTION_ROUTINE.md index dd8678f..eb5d21c 100644 --- a/architecture/METRIC_COMPACTION_ROUTINE.md +++ b/architecture/METRIC_COMPACTION_ROUTINE.md @@ -11,7 +11,7 @@ The Metric Pruning routine is responsible for deleting any metrics that are olde ```bash # Whether metric pruning routines should run on the configured interval, defaults to true METRIC_PRUNING_ENABLED=true -# How frequenlty metric pruning routines should run +# How frequently metric pruning routines should run # defaults to 1 day METRIC_PRUNING_ROUTINE_INTERVAL_SECONDS=10 # how long (after the proxy service starts) it will wait diff --git a/routines/metric_partitioning.go b/routines/metric_partitioning.go index 57c96fa..9d96026 100644 --- a/routines/metric_partitioning.go +++ b/routines/metric_partitioning.go @@ -115,7 +115,8 @@ func partitionsForPeriod(start time.Time, numDaysToPrefill int) ([]PartitionPeri daysInCurrentMonth := daysInMonth(start) - newDaysRemainingInCurrentMonth := daysInCurrentMonth - currentDay + // add one to include the current day + newDaysRemainingInCurrentMonth := daysInCurrentMonth - currentDay + 1 // generate partitions for current month totalPartitionsToGenerate := numDaysToPrefill