Skip to content

Commit

Permalink
Merge #127864
Browse files Browse the repository at this point in the history
127864: storage: stop setting IterOptions.TableFilter r=sumeerbhola a=jbowens

Stop configuring time-bound iterators to filter sstables based on the table-level properties that predate block property filters. These properties are now obsolete, and the same information is captured in the table-level MVCC block property. The oldest supported pebble.FormatMajorVersion (FormatFlushableIngest introduced in v23.1) guarantees that all sstables that predate the introduction of block-property filters have already been compacted.

Epic: none
Release note: none

Co-authored-by: Jackson Owens <[email protected]>
  • Loading branch information
craig[bot] and jbowens committed Jul 29, 2024
2 parents 1182413 + e5af508 commit 5d9405f
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions pkg/storage/pebble_iterator.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,25 +288,6 @@ func (p *pebbleIterator) setOptions(
}), 0x01 /* Synthetic bit */)
p.options.SkipPoint = p.skipPointIfOutsideTimeBounds

// TODO(erikgrinaker): For compatibility with SSTables written by 21.2 nodes
// or earlier, we filter on table properties too. We still wrote these
// properties in 22.1, but stop doing so in 22.2. We can remove this
// filtering when nodes are guaranteed to no longer have SSTables written by
// 21.2 or earlier (which can still happen e.g. when clusters are upgraded
// through multiple major versions in rapid succession).
encodedMinTS := string(p.minTimestamp)
encodedMaxTS := string(p.maxTimestamp)
p.options.TableFilter = func(userProps map[string]string) bool {
tableMinTS := userProps["crdb.ts.min"]
if len(tableMinTS) == 0 {
return true
}
tableMaxTS := userProps["crdb.ts.max"]
if len(tableMaxTS) == 0 {
return true
}
return encodedMaxTS >= tableMinTS && encodedMinTS <= tableMaxTS
}
// We are given an inclusive [MinTimestamp, MaxTimestamp]. The
// MVCCWAllTimeIntervalCollector has collected the WallTimes and we need
// [min, max), i.e., exclusive on the upper bound.
Expand Down

0 comments on commit 5d9405f

Please sign in to comment.