Skip to content

4.6.0

Latest

Choose a tag to compare

@cberner cberner released this 13 Nov 19:01
· 2 commits to master since this release

Minor improvements

  • A new database starts at 72 KiB instead of about 1 MiB, and grows as it is written to.

Bug fixes

  • Fix repair falling back to a commit slot that failed its checksum, which could open a damaged
    database as an empty one instead of returning StorageError::Corrupted.
  • commit() returns CommitError::TransactionPoisoned when a table opened in the transaction was
    leaked, for example with mem::forget(), instead of committing a corrupted database.
  • MultimapTable::insert() and MultimapTable::remove() poison the write transaction if the key
    or value type panics part way through, instead of leaving a transaction that commits a corrupted
    table.
  • Fix begin_read() on a SingleWriter or MultiWriter database failing with
    StorageError::Corrupted while an ExclusiveWriter open of the same file was being refused.
  • Fix compact() on a SingleWriter or MultiWriter database returning
    CompactionError::TransactionInProgress while a read-only ExclusiveWriter open of the same file
    was being refused.
  • When a lock on a SingleWriter or MultiWriter database cannot be released, later operations
    on that database return StorageError::PreviousIo until it is closed, which releases the lock.
    Before, the database kept working while the other processes sharing the file were blocked.
  • Fix a read-only open in SingleWriter or MultiWriter mode accepting a database that needs
    repair, instead of returning DatabaseError::RepairAborted, while a read-only ExclusiveWriter
    open of the same file was in progress.
  • Fix a refused read-only ExclusiveWriter open disturbing the SingleWriter or MultiWriter
    handles of the same file: try_begin_write() could return TransactionError::WouldBlock, a
    MultiWriter open DatabaseError::DatabaseAlreadyOpen, and closing the last handle could leave
    the database needing repair, so that read-only opens returned DatabaseError::RepairAborted.
  • Fix ReadOnlyDatabase::open() failing with DatabaseError::DatabaseAlreadyOpen beside another
    read-only handle, while a SingleWriter or MultiWriter open of the same file was being refused.
  • Fix a MultiWriter process aborting the next time its write transaction grew the file, after a
    write transaction in another process had grown it and then ended without a commit, because that
    process was killed or a panic dropped the transaction.
  • Fix check_integrity() returning Ok(false) for an undamaged database that had grown to exactly
    one full region, which is 4 GiB with the default settings.
  • Fix a read that was in progress when its database was closed returning data from a later commit,
    instead of completing or returning StorageError::DatabaseClosed. Closing now waits for the
    reads and writes in progress.
  • Fix check_integrity(), and opens that verify or repair, taking exponential time on a damaged
    B-tree whose pages are shared between several parents.