-
Notifications
You must be signed in to change notification settings - Fork 30.3k
Add direct-key SST format support for optimized integer-keyed families #88921
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: canary
Are you sure you want to change the base?
Conversation
This adds a new storage format for families with fixed-size integer keys: - FamilyFormat trait for per-family storage configuration - Direct-key fixed-value format: inline storage without compression - Direct-key variable-value format: direct keys with compressed values - MetaEntryFlags extension for format metadata - New SST writers: write_direct_fixed_sst(), write_direct_variable_sst() - New SST readers: lookup_direct_fixed(), lookup_direct_variable() This enables ~40% size reduction for TaskIdToTaskTypeHash and ~8 bytes/entry savings for TaskMeta/TaskData families.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Stats from current PR✅ No significant changes detected📊 All Metrics📖 Metrics GlossaryDev Server Metrics:
Build Metrics:
Change Thresholds:
⚡ Dev Server
📦 Dev Server (Webpack) (Legacy)📦 Dev Server (Webpack)
⚡ Production Builds
📦 Production Builds (Webpack) (Legacy)📦 Production Builds (Webpack)
📦 Bundle SizesBundle Sizes⚡ TurbopackClient Main Bundles: **432 kB** → **432 kB** ✅ -32 B82 files with content-based hashes (individual files not comparable between builds) Server Middleware
Build DetailsBuild Manifests
📦 WebpackClient Main Bundles
Polyfills
Pages
Server Edge SSR
Middleware
Build DetailsBuild Manifests
Build Cache
🔄 Shared (bundler-independent)Runtimes
|
Merging this PR will not alter performance
Comparing Footnotes
|
- Add MetaFileFormat enum (Hashed, DirectFixed, DirectVariable) to distinguish entry formats in meta files - Create format-specific entry structs: HashedMetaEntry, DirectFixedMetaEntry, DirectVariableMetaEntry with appropriate fields for each format type - Wrap entries in MetaEntry enum with type-safe accessors (as_hashed(), as_direct_fixed(), as_direct_variable()) - Update MetaFileBuilder to write format byte and format-specific entries - Update MetaFile::open_internal to read format byte and parse format-specific entries - Add unreachable!() assertions for impossible cases in db.rs (AMQF miss and blob values in direct-fixed format) - Update README with new meta file format documentation Co-Authored-By: Claude Opus 4.5 <[email protected]>
Add comprehensive test coverage for the new direct-key formats: - test_direct_variable_sst: Tests write_direct_variable_sst and lookup_direct_variable covering all value types (small, medium, deleted, blob reference) - test_meta_file_direct_fixed_roundtrip: Tests meta file write/read for DirectFixed format entries with end-to-end lookup verification - test_meta_file_direct_variable_roundtrip: Tests meta file write/read for DirectVariable format entries with end-to-end lookup verification Also fixes a bug in lookup_direct_variable where the standard block offset calculations were used instead of the direct-variable layout. Added specialized methods for direct-variable block access: - decode_direct_variable_value - get_direct_variable_block_range - get_direct_variable_block - read_direct_variable_block Co-Authored-By: Claude Opus 4.5 <[email protected]>

No description provided.