From 31535963e18c32dc6181031816ecb5a687a5241d Mon Sep 17 00:00:00 2001 From: Devan Date: Tue, 17 Dec 2024 15:18:39 -0600 Subject: [PATCH] feat: code removal from debugging --- tsdb/engine/tsm1/compact.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tsdb/engine/tsm1/compact.go b/tsdb/engine/tsm1/compact.go index 9c91ea8a9b..1ccde947e5 100644 --- a/tsdb/engine/tsm1/compact.go +++ b/tsdb/engine/tsm1/compact.go @@ -470,11 +470,8 @@ func (c *DefaultPlanner) Plan(lastWrite time.Time) ([]CompactionGroup, int64) { for i, group := range generations { var skip bool - gs := group.size() - bc := c.FileStore.BlockCount(group.files[0].Path, 1) - gl := len(generations) // Skip the file if it's over the max size and contains a full block and it does not have any tombstones - if gl > 2 && gs >= uint64(maxTSMFileSize) && bc == tsdb.DefaultMaxPointsPerBlock && !group.hasTombstones() { + if len(generations) > 2 && group.size() > uint64(maxTSMFileSize) && c.FileStore.BlockCount(group.files[0].Path, 1) == tsdb.DefaultMaxPointsPerBlock && !group.hasTombstones() { skip = true }