Skip to content

Commit

Permalink
do not write buckets on disk if limit set to 0
Browse files Browse the repository at this point in the history
  • Loading branch information
hrissan committed Aug 30, 2023
1 parent c9b69d9 commit a0a6738
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/agent/agent_shard_send.go
Original file line number Diff line number Diff line change
Expand Up @@ -786,6 +786,9 @@ func (s *ShardReplica) diskCachePutWithLog(cbd compressedBucketData) {
if s.agent.diskCache == nil {
return
}
// Motivation - we want to set limit dynamically.
// Also, if limit is set ti 0, we want to gradually erase all seconds.
// That's why we create diskCache always
s.mu.Lock()
maxHistoricDiskSize := s.config.MaxHistoricDiskSize
s.mu.Unlock()
Expand Down

0 comments on commit a0a6738

Please sign in to comment.