Releases: fjall-rs/fjall
0.6.3
- Updated dependencies
0.6.2
0.6.1
0.6.0
- Disable bloom filters by default
0.5.0
Breaking
- added
Config::flush_worker
to configure maximum amount of parallel memtable flushes - added
Keyspace::persist_paranoid
, which uses fsync, compared toKeyspace::persist
which uses fdatasync - added
Keyspace::list_partitions
- added
axum-kv
example - upgraded lsm-tree to 0.5.0
- internal refactors
- finished repo restructuring
0.4.0
Breaking
lsm-tree
- Improved bloom filter performance by heuristically optimizing
k
- (breaking) use enhanced double hashing for bloom filter probing
0.3.2
Fjall
- add some write buffer tests
- internal naming changes
lsm-tree
- make fifo compaction less pessimistic than it needs to be
- refactors & more tests
Misc
- Fix examples link
- Fix CI pipeline timeout
0.3.1
Fjall
- Fix: take sealed memtable sizes into account on recovery
- Increase default max journal size to 512 MiB
- Add Keyspace::write_buffer_size
- Refactor keyspace recovery
- Refactor write buffer management
- Relaxed write stall/halt thresholds a bit (increased by 4 segments)
lsm-tree
- Add BlockCache::capacity
- Change default target size of levelled compaction to 64 MiB
0.3.0 - New crates, new architecture
All this is breaking and unstable!!!
New architecture
lsm-tree
is now a much more simple, primitive, commit-log agnostic LSM-KV crate. It serves as the foundation for fjall
which will take its place of a full-featured LSM-based storage engine akin to RocksDB. See details below.
Bloom filters #12
Implemented bloom filters for point lookups.
Migration
Change
lsm-tree = "0.2.3"
to
fjall = "0.3.0"
Simple example, old:
use lsm_tree::Config;
fn main() -> lsm_tree::Result<()> {
let tree = Config::default().open()?;
tree.insert("abc", "def")?;
tree.flush()?;
let item = tree.get("abc")?;
Ok(())
}
new:
use fjall::{Config, PartitionCreateOptions};
fn main() -> fjall::Result<()> {
let keyspace = Config::default().open()?;
let tree = keyspace.open_partition("default", PartitionCreateOptions::default())?;
tree.insert("abc", "def")?;
keyspace.persist()?;
let item = tree.get("abc")?;
Ok(())
}
Instead of a single tree, there is now a top-level keyspace that may contain multiple partitions. Use open_partition
to get a handle to a partition. It will be created on the fly it it didn't exist before. A partition then has the same API as Tree
used to have.
A partition should only be opened once. Opening a partition is not expensive, but it can be avoided by keeping the partition handle around. Keyspace
and PartitionHandle
are both thread-safe and can be cloned around freely. A Keyspace
should be only be opened once, and one keyspace should be enough for any application (it is the equivalent of a RocksDB Database
, each partition being a Column Family
).
PartitionCreateOptions
allows adjusting some settings like the block size and the levels of the LSM-tree. Once a partition is created, these options are fixed and will not be taken into account after recovery.
There are some runtime partition options that can be changed during runtime on demand however, like:
use fjall::compaction::Levelled;
partition
.set_compaction_strategy(Arc::new(Levelled::default()))
.set_max_memtable_size(/* 16 MiB */ 16 * 1_024 * 1_024);
More documentation to follow.