Skip to content

Commit

Permalink
Added metadata.NoDownsampleMarkVersion1 field
Browse files Browse the repository at this point in the history
Signed-off-by: Rohit Singh <rohitkochhar@bitgo.com>
  • Loading branch information
Rohit Singh committed Dec 7, 2022
1 parent 554c55d commit 5fe8343
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/block/block.go
Expand Up @@ -416,7 +416,7 @@ func MarkForNoDownsample(ctx context.Context, logger log.Logger, bkt objstore.Bu
}
noDownsampleMark, err := json.Marshal(metadata.NoDownsampleMark{
ID: id,
Version: metadata.NoCompactMarkVersion1,
Version: metadata.NoDownsampleMarkVersion1,

NoDownsampleTime: time.Now().Unix(),
Reason: reason,
Expand Down
2 changes: 2 additions & 0 deletions pkg/block/metadata/markers.go
Expand Up @@ -31,6 +31,8 @@ const (
DeletionMarkVersion1 = 1
// NoCompactMarkVersion1 is the version of no-compact-mark file supported by Thanos.
NoCompactMarkVersion1 = 1
// NoDownsampleVersion1 is the version of no-downsample-mark file supported by Thanos.
NoDownsampleMarkVersion1 = 1
)

var (
Expand Down
2 changes: 1 addition & 1 deletion pkg/compact/downsample/downsample.go
Expand Up @@ -759,7 +759,7 @@ func NewGatherNoDownsampleMarkFilter(logger log.Logger, bkt objstore.Instrumente
}
}

// NoDownsampleMarkedBlocks returns block ids that were marked for no downsample
// NoDownsampleMarkedBlocks returns block ids that were marked for no downsample.
func (f *GatherNoDownsampleMarkFilter) NoCompactMarkedBlocks() map[ulid.ULID]*metadata.NoDownsampleMark {
f.mtx.Lock()
copiedNoDownsampleMarked := make(map[ulid.ULID]*metadata.NoDownsampleMark, len(f.noDownsampleMarkedMap))
Expand Down

0 comments on commit 5fe8343

Please sign in to comment.