Repository navigation
chore(deps): update redb to v5 - #6486
Merged
Merged
Conversation
redb 5 removes the inherent get/range of ReadOnlyTable, takes a key range without a type parameter, requires a CompactionMode for compact(), returns BackendError from StorageBackend I/O, and makes FileBackend::new infallible. Compaction keeps the previous behaviour with CompactionMode::Balanced. None of our tables use the Option<&str/String/bool/char> encodings that v5 changed, and none implement Value or Key, so files written by redb 4 (storage, sync state, core logs, the jobs journal, tsdb and the legacy v3 traffic file) open unchanged. The storage error contract test now expects v5's wording of a table type mismatch. The runtime pin moves to the matching redb 5 update, since nyanpasu-utils classifies redb errors by downcasting and every crate must link the same redb.
Changed Files
|
# Conflicts: # backend/Cargo.lock
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Updates redb to v5 and adapts to its API changes:
ReadOnlyTablelost its inherentget/range; the legacy v3 traffic import and the startup recovery tests now call them throughReadableTable.rangetakes a key range without a type parameter; the turbofish is dropped in the legacy traffic import and tsdb.Database::compacttakes aCompactionMode; tsdb usesCompactionMode::Balanced, the previous behaviour.StorageBackendI/O returnsBackendErrorandFileBackend::newis infallible; the four test and benchmark backends in tsdb follow.Compatibility
No table uses the
Option<&str/String/bool/char>encodings that v5 changed, and nothing implementsValueorKey. Files written by redb 4 open unchanged: storage, sync state, core logs, the jobs journal, tsdb and the legacy v3 traffic file.Notes for review
redb-4.4.0/src/...line numbers are left as they are. They name the version they refer to.client::profiles::tests::deleting_a_profile_removes_its_proxy_group_layoutfailed once with a Windows access-denied error and passed on three reruns; it does not touch redb.