Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

storage: increase capacity of PointKeyFilters slice #104560

Merged
merged 1 commit into from
Jun 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion pkg/storage/pebble_iterator.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,11 +277,16 @@ func (p *pebbleIterator) setOptions(opts IterOptions, durability DurabilityRequi
// We are given an inclusive [MinTimestampHint, MaxTimestampHint]. The
// MVCCWAllTimeIntervalCollector has collected the WallTimes and we need
// [min, max), i.e., exclusive on the upper bound.
p.options.PointKeyFilters = []pebble.BlockPropertyFilter{
//
// NB: PointKeyFilters documents that when set to non-empty, the capacity
// of the slice should be at least one more than the length, for a
// Pebble-internal performance optimization.
pkf := [2]pebble.BlockPropertyFilter{
sstable.NewBlockIntervalFilter(mvccWallTimeIntervalCollector,
uint64(opts.MinTimestampHint.WallTime),
uint64(opts.MaxTimestampHint.WallTime)+1),
}
p.options.PointKeyFilters = pkf[:1:2]
// NB: We disable range key block filtering because of complications in
// MVCCIncrementalIterator.maybeSkipKeys: the TBI may see different range
// key fragmentation than the main iterator due to the filtering. This would
Expand Down