Skip to content

v1.0.1

Choose a tag to compare

@anidotnet anidotnet released this 05 Oct 12:03
· 20 commits to main since this release

Ported from the corresponding fixes in nitrite-java, where each was found.

Fixed

  • A unique index no longer rejects a document over a key that document already holds.
    add_nitrite_ids treated any existing id under the key as a violation, so it counted the
    writer's own id against it. That bites a unique index over an array field with a repeated
    element — ["a", "b", "a"] visits a twice, and the second visit collided with the entry the
    first had just written — and any path that reaches a key the document already owns, such as an
    index rebuild or a replayed write. Another document under the key is still a violation.
    (nitrite/nitrite-java#1295)

Changed

  • An update that leaves an indexed value unchanged no longer rewrites the index.
    update_index_entry treated an index as affected whenever the update document carried the
    indexed field, and then removed and rewrote the entry. An update that writes the whole document
    back — the common upsert shape — carries every indexed field with its old value, so every index
    was rebuilt on every update for nothing. The old and new values are now compared, and the index
    is left alone when they match. A dirty index is still rebuilt, since that has to happen on the
    first write regardless. (nitrite/nitrite-java#1297)

Dependencies

  • base64 0.22 → 0.23, and lockfile updates to tokio, uuid, serde, syn, dashmap,
    indexmap, anyhow, thiserror, tempfile, log, rustc-hash, futures-util,
    crossbeam-channel and fake. No API or on-disk format change.
  • redb 3.1 → 4.3 (benchmark comparison only), lru 0.16 → 0.18,
    smallvec 1.15 → 1.16, xxhash-rust → 0.8.19 and rand 0.9 → 0.9.5 (clearing two low-severity
    advisories), and ctor 0.6 → 1.0 (test-only; test initializers now declare
    #[ctor(unsafe)]).