Skip to content

v0.3.0

Compare
Choose a tag to compare
@ecton ecton released this 03 Mar 16:17
· 358 commits to main since this release
3390f6c

Blog Post: https://bonsaidb.io/blog/bonsaidb-v0-3-0

This release welcomes @vbmade2000 as a contributor to BonsaiDb. Thank you!

Breaking Changes

  • bonsaidb::local::jobs is now private. It used to be a separate, public crate
    in the PliantDb days. After thinking about the job scheduler more, this
    initial implementation is better suited for the internal task management than
    the higher-level jobs system. As such, it has been internalized.

  • bonsaidb::core::transaction::Changes::Documents has been changed to store
    the CollectionNames separately from the ChangedDocuments. This makes the
    transaction log entries smaller, as collection names aren't copied for each
    document.

    The storage layer is fully backwards compatible and will automatically convert
    existing transactions to the new format.

Fixed

  • Listing executed transactions that were written in v0.1 was broken in
    v0.2. Backwards compatibility is now automatically tested to help ensure
    this sort of issue won't happen in the future again.

Added

  • SerializedCollection::list_with_prefix,
    connection::Collection::list_with_prefix, and
    connection::View::with_key_prefix have been added as an easy way to filter
    results based on whether the key starts with the given prefix.

    This is supported by a new trait, IntoPrefixRange. This trait has been
    implemented for all byte-based key implementations as well as for String.

  • Operation::push_serialized has been added, which calls natural_id before
    creating an Operation::Insert variant.

  • Tasks::parallelization and Builder::workers_parallelization have been
    added as a way to control how many threads can be used by any given
    task/worker. This is automatically configured to be the number of cpu cores
    detected.

  • count() is a new function on the list builders, available via:

    • SerializedCollection::all(db).count().await
    • SerializedCollection::list(42.., db).count().await
    • db.collection::<Collection>().all().count().await
    • db.collection::<Collection>().list(42..).count().await

    The performance of this call is not as good as it will eventually be, as it is
    currently doing more work than strictly necessary.

  • #215: StorageConnection::delete_user has been added, enabling
    deletions of users without directly interacting with the admin database.

Changed

  • The view map/reduce system has been optimized to take advantage of some
    parallelism. The view system is still not hightly optimized, but this change
    makes a significant improvement on performance.