From f7ad4ca486ae381e2b54715036de6e742a7f725f Mon Sep 17 00:00:00 2001 From: Jackson Owens Date: Thu, 30 Jan 2025 13:49:53 -0500 Subject: [PATCH] cockroachkvs: add MVCCWallTimeIntervalRangeKeyMask.Init Add an Init method to MVCCWallTimeIntervalRangeKeyMask that initializes the mask appropriately, inclluding setting the appropriate block-property name. --- cockroachkvs/blockproperties.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cockroachkvs/blockproperties.go b/cockroachkvs/blockproperties.go index 22ebd0b9b2..d5bc61b15a 100644 --- a/cockroachkvs/blockproperties.go +++ b/cockroachkvs/blockproperties.go @@ -45,6 +45,14 @@ type MVCCWallTimeIntervalRangeKeyMask struct { sstable.BlockIntervalFilter } +// Init initializees the mask and its block interval filter. +func (m *MVCCWallTimeIntervalRangeKeyMask) Init() { + m.BlockIntervalFilter.Init( + mvccWallTimeIntervalCollector, + 0, math.MaxUint64, + MVCCBlockIntervalSuffixReplacer{}) +} + // SetSuffix implements the pebble.BlockPropertyFilterMask interface. func (m *MVCCWallTimeIntervalRangeKeyMask) SetSuffix(suffix []byte) error { if len(suffix) == 0 {