cockroachdb / cockroachdb/pebble

db: SeekPrefixGE lazy positioning, or GetPrefix

Aperta
#2,002 7 commenti 0 reazioni 0 assegnatari Vedi su GitHub
A-storage C-enhancement T-storage
Lingua principale
Go
Stelle
6k
Fork
584
Merge medio
16h 35m
PR unite (30g)
5

Descrizione

I have not thought through the design space here in detail, but it seems possible to use MVCC metadata about sstables (eg, the computed block properties) to avoid reading files that contain older versions of a key during a SeekPrefixGE. The goal would be to reduce block reads during MVCCGets, making MVCCGets performance profile more similar to a pebble Get.

A design, just to serve as an illustrative example:
* the sstable iterator SeekPrefixGE returns a synthetic `@`key if the bloom filter indicates the file may contain the key
* the merging iterator is updated to skip past these synthetic keys (much like it does today for range tombstones)
* nexting a sstable iterator last positioned by SeekPrefixGE actually performs the seek

if we elevated MVCC timestamps into the `*fileMetadata`, it seems like we could even avoid some of the bloom filter reads and table loads.

Somewhat related to #2182.

Jira issue: PEBBLE-142

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.