From 93b80ca7ba72ab7e15232bfea44b505414e60f4c Mon Sep 17 00:00:00 2001 From: Peter Dillinger Date: Tue, 24 Mar 2020 21:19:56 -0700 Subject: [PATCH] Update default BBTO::format_version from 2 to 4 (#6582) Summary: Version 4 has been around long enough, for compatibility and extensive validation, that it should be default. Pull Request resolved: https://github.com/facebook/rocksdb/pull/6582 Test Plan: CI (w.r.t. changing the default; format_version=4 is well tested and massively in production at Facebook) Reviewed By: siying Differential Revision: D20625233 Pulled By: pdillinger fbshipit-source-id: 2f83ed874cffa4a39bc7a66cdf3833b978fbb948 --- HISTORY.md | 1 + include/rocksdb/table.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index 6ff8c6ee9..2b0f60df9 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -2,6 +2,7 @@ ## Unreleased ### Public API Change * Fix spelling so that API now has correctly spelled transaction state name `COMMITTED`, while the old misspelled `COMMITED` is still available as an alias. +* Updated default format_version in BlockBasedTableOptions from 2 to 4. SST files generated with the new default can be read by RocksDB versions 5.16 and newer, and use more efficient encoding of keys in index blocks. ### Bug Fixes * Fix a bug where range tombstone blocks in ingested files were cached incorrectly during ingestion. If range tombstones were read from those incorrectly cached blocks, the keys they covered would be exposed. diff --git a/include/rocksdb/table.h b/include/rocksdb/table.h index fb5d67114..2263c765c 100644 --- a/include/rocksdb/table.h +++ b/include/rocksdb/table.h @@ -272,7 +272,7 @@ struct BlockBasedTableOptions { // 5 -- Can be read by RocksDB's versions since 6.6.0. Full and partitioned // filters use a generally faster and more accurate Bloom filter // implementation, with a different schema. - uint32_t format_version = 2; + uint32_t format_version = 4; // Store index blocks on disk in compressed format. Changing this option to // false will avoid the overhead of decompression if index blocks are evicted