Skip to content

Commit

Permalink
Remove the ancient crutch
Browse files Browse the repository at this point in the history
  • Loading branch information
alpinskiy committed Nov 26, 2024
1 parent 3a117d2 commit bb10ba4
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions internal/api/tscache.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,6 @@ func newTSCacheGroup(approxMaxSize int, lodTables map[string]map[int64]string, u
}

for version, tables := range lodTables {
drop := dropEvery
if version == Version2 || version == Version3 {
drop = 0 // NB! WHY??
}

g.pointCaches[version] = map[int64]*tsCache{}
for stepSec := range tables {
now := time.Now()
Expand All @@ -75,7 +70,7 @@ func newTSCacheGroup(approxMaxSize int, lodTables map[string]map[int64]string, u
cache: map[string]*tsEntry{},
invalidatedAtNano: map[int64]int64{},
lastDrop: now,
dropEvery: drop,
dropEvery: dropEvery,
bytesAlloc: statshouse.GetMetricRef(format.BuiltinMetricAPICacheBytesAlloc, statshouse.Tags{
1: srvfunc.HostnameForStatshouse(), 2: version, 3: strconv.FormatInt(stepSec, 10),
}),
Expand Down

0 comments on commit bb10ba4

Please sign in to comment.