Skip to content

chore(deps): bump redb from 2.6.2 to 3.0.0 #1761

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Aug 12, 2025

Bumps redb from 2.6.2 to 3.0.0.

Release notes

Sourced from redb's releases.

3.0.0 - 2025-08-09

Removes support for file format v2.

Use Database::upgrade(), in redb 2.6, to migrate to the v3 file format.

General storage optimizations

The v3 file format has been further optimized to reduce the size of the database. Databases with only a few small keys will see the largest benefit, and the minimum size of a database file has decreased from ~2.5MiB to ~50KiB. To achieve the smallest file size call Database::compact() before dropping the Database.

Additionally, performance is ~15% better in bulk load benchmarks. This was achieved by implementing a custom hash function for various in-memory HashSets and HashMaps, and by optimizing the usage of buffers held in Arcs to reduce the number of atomic instructions executed.

Optimize storage of tuple types

Storage of variable width tuple types with arity greater than 1 is more efficient. The new format elides the length of any fixed width fields and uses varint encoding for the lengths of all variable width fields.

Note that this encoding is not compatible with the serialization of variable width tuples used in prior versions. To load tuple data created prior to version 3.0, wrap them in the Legacy type. For example, TableDefinition<u64, (&str, u32)> becomes TableDefinition<u64, Legacy<(&str, u32)>>. Fixed width tuples, such as (u32, u64) are backwards compatible.

Derive for Key and Value traits

Key and Value can be derived using the redb-derive crate. Note that it does not support schema migration. The recommended pattern to migrate schema is to create a new table, and then perform a migration from the old table to the new table.

Read-only multi-process support

Multiple processes may open the same database file for reading by using the new ReadOnlyDatabase type. On platforms which support file locks, this acquires a shared lock on the database file.

Enable garbage collection in Durability::None transactions

Non-durable transactions will now free pages when possible (pages allocated in a preceding non-durable transaction which are no longer referenced). This resolves an issue where a long sequence of non-durable transactions led to significant growth in the size of the database file. This change increases the RAM required for a sequence of non-durable transactions, such that RAM proportional to the net change in the database is now used. However, it will never use more than about 0.2% of the database file size.

Other changes

  • Add ReadOnlyDatabase
  • Add Builder::open_read_only()
  • Add StorageBackend::close()
  • Add Table::get_mut()
  • Add chrono_v0_4 feature flag which enables serialization of the NaiveDate, NaiveTime,

... (truncated)

Changelog

Sourced from redb's changelog.

3.0.0 - 2025-08-09

Removes support for file format v2.

Use Database::upgrade(), in redb 2.6, to migrate to the v3 file format.

General storage optimizations

The v3 file format has been further optimized to reduce the size of the database. Databases with only a few small keys will see the largest benefit, and the minimum size of a database file has decreased from ~2.5MiB to ~50KiB. To achieve the smallest file size call Database::compact() before dropping the Database.

Additionally, performance is ~15% better in bulk load benchmarks. This was achieved by implementing a custom hash function for various in-memory HashSets and HashMaps, and by optimizing the usage of buffers held in Arcs to reduce the number of atomic instructions executed.

Optimize storage of tuple types

Storage of variable width tuple types with arity greater than 1 is more efficient. The new format elides the length of any fixed width fields and uses varint encoding for the lengths of all variable width fields.

Note that this encoding is not compatible with the serialization of variable width tuples used in prior versions. To load tuple data created prior to version 3.0, wrap them in the Legacy type. For example, TableDefinition<u64, (&str, u32)> becomes TableDefinition<u64, Legacy<(&str, u32)>>. Fixed width tuples, such as (u32, u64) are backwards compatible.

Derive for Key and Value traits

Key and Value can be derived using the redb-derive crate. Note that it does not support schema migration. The recommended pattern to migrate schema is to create a new table, and then perform a migration from the old table to the new table.

Read-only multi-process support

Multiple processes may open the same database file for reading by using the new ReadOnlyDatabase type. On platforms which support file locks, this acquires a shared lock on the database file.

Enable garbage collection in Durability::None transactions

Non-durable transactions will now free pages when possible (pages allocated in a preceding non-durable transaction which are no longer referenced). This resolves an issue where a long sequence of non-durable transactions led to significant growth in the size of the database file. This change increases the RAM required for a sequence of non-durable transactions, such that RAM proportional to the net change in the database is now used. However, it will never use more than about 0.2% of the database file size.

Other changes

  • Add ReadOnlyDatabase
  • Add Builder::open_read_only()
  • Add StorageBackend::close()
  • Add Table::get_mut()
  • Add chrono_v0_4 feature flag which enables serialization of the NaiveDate, NaiveTime,

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [redb](https://github.com/cberner/redb) from 2.6.2 to 3.0.0.
- [Release notes](https://github.com/cberner/redb/releases)
- [Changelog](https://github.com/cberner/redb/blob/master/CHANGELOG.md)
- [Commits](cberner/redb@v2.6.2...v3.0.0)

---
updated-dependencies:
- dependency-name: redb
  dependency-version: 3.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file rust Pull requests that update Rust code labels Aug 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file rust Pull requests that update Rust code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants