Ranged tail
Only builds that include footer revision 4 support read it.
A ranged tail is used when the footer has both BLOOM_SKIP and BLOOM_RANGES set. It extends the skip tail with a list of key prefixes. It appears in footer revision 4 and revision 5 files, and was added without a stamp bump. Current writers emit it only inside revision 5 footers.
Layout
Section titled “Layout”bits ‖ n_tags u8 ‖ tags ‖ (len u8 ‖ prefix)* ‖ body_len u32 LE| Part | Meaning |
|---|---|
bits |
the filter blocks; len(bits) % 32 == 0 |
n_tags, tags |
skip tags, as in the skip tail |
(len u8 ‖ prefix)* |
the excluded prefixes: at most 256, each 1 to 255 bytes |
body_len |
u32 LE; counts from n_tags to the end of the prefixes |
Reader behaviour
Section titled “Reader behaviour”A key whose first byte is a listed tag, or that starts with any listed prefix, was not added. may_contain is true for it. A malformed tail is Corrupt("bloom skip").
Writer behaviour
Section titled “Writer behaviour”The tail, and with it the BLOOM_RANGES flag, is written only when at least one key was actually left out by a prefix. The prefixes are written sorted and deduplicated.
The SQL layer registers prefixes 0x01 ‖ root_table_id u32 BE for every table created WITH (bloom = off), see Ext B: bloom off.
Compatibility
Section titled “Compatibility”A build that does not know footer revision 4 fails with NewerFormat("sst footer") before it reaches the bloom. See Compatibility rules.