Skip to content

Commit

Permalink
account for partition gap when metric collection is flipped periodica…
Browse files Browse the repository at this point in the history
…lly (#51)
  • Loading branch information
galxy25 authored Oct 31, 2023
1 parent ac2dec0 commit b637222
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion architecture/METRIC_COMPACTION_ROUTINE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion routines/metric_partitioning.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b637222

Please sign in to comment.