Repository navigation
v1.0.1
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_idstreated 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"]visitsatwice, 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_entrytreated 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
base640.22 → 0.23, and lockfile updates totokio,uuid,serde,syn,dashmap,
indexmap,anyhow,thiserror,tempfile,log,rustc-hash,futures-util,
crossbeam-channelandfake. No API or on-disk format change.redb3.1 → 4.3 (benchmark comparison only),lru0.16 → 0.18,
smallvec1.15 → 1.16,xxhash-rust→ 0.8.19 andrand0.9 → 0.9.5 (clearing two low-severity
advisories), andctor0.6 → 1.0 (test-only; test initializers now declare
#[ctor(unsafe)]).