forked from cockroachdb/pebble
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
db,sstable: block property collectors and filters
Block property collectors (and the corresponding filters) are an optional user-facing feature that can be used to ignore data in the context of an Iterator. The finest granularity of operation is a data block, and the properties are aggregated into the upper level index block, and the sstable, so an entire lower level index block (and its data blocks), or an entire sstable can be ignored. Multiple collectors can be configured in a DB, with recommendations to keep the total size of properties of a block to < 50-100 bytes. The collector can extract properties from the key or value. The first use case for this will be to extract the MVCC timestamp in CockroachDB, and use it for fine grained time-bound iteration. One can imagine extracting min-max values of other columns either in the key or value, when the key-value represents tabular data. To efficiently handle multiple collectors, a collector needs to be identified with a short integer id, in addition to a unique name. The id is encoded in index entries. The name is encoded in the properties block for the sstable. Helper collector and filter implementations are provided for properties represented as a set of the form [lower,upper), where both lower and upper are uint64. The feature is incompatible with older versions of Pebble since block handles can be longer and older versions have checks regarding no extra bytes in a block handle, which will fail. Fixes cockroachdb#1190
- Loading branch information
1 parent
b2eb88a
commit 42c2ea1
Showing
17 changed files
with
1,398 additions
and
188 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.