cockroachdb / pebble

RocksDB/LevelDB inspired key-value database in Go
BSD 3-Clause "New" or "Revised" License
4.6k stars 424 forks source link

sstable/block: additional refactoring #3694

Closed jbowens closed 5 days ago

jbowens commented 6 days ago

sstable/block: move Checksummer, ChecksumType

Move sstable.ChecksumType and sstable.Checksummer types into the sstable/block package.

sstable/block: add Trailer type

Add a fixed-width block.Trailer type, and use it to avoid subtle usage of blockBuf.tmp to pass encoded trailers.

sstable/block: clean up cache.Value and BufferPool union

Clean up the block.CacheValueOrBuf union type, renaming it to block.Value and adding a single block.Alloc entry point for constructing values.

cockroach-teamcity commented 6 days ago

This change is Reviewable