Skip to content

Changelog

Experimental. The API is not stable and nothing here is wired into a database engine yet. What may change.

All notable changes to tiervec are in this file. The layout follows Keep a Changelog. The version rule and the steps of a release are in docs/RELEASING.md. Until 1.0, a breaking change to the supported surface (docs/API.md) needs a new minor version.

Unreleased

Added

  • checkpoint accepts a tier whose tail is not empty and builds no segment for it: the rows go into a tail file (tail-<generation>.tvt) and open puts them back into the tail. The high-water id of a checkpoint now covers the tail, so a host replays only what it applied afterwards; open with a record source checks the tail ids too. Capability.PERSISTED_TAIL says that no seal is needed first. One-way format change: the manifest is major 2. Directories written before still open; 0.1.0 and 0.1.1 refuse a directory written by this version, with UnsupportedException, also on checkpoint, and also when the tail was empty. The cost of a checkpoint with a tail and of the open is not measured yet (docs/SEGMENT-FORMAT.md, issue #158).
  • The checksum that a manifest holds of its tombstone file now covers the content of that file. Before, it was taken over the whole file, which ends in its own checksum, so it came out the same for any content, and a tombstone file with the same generation, segments, and row counts but other marked rows opened. Part of manifest major 2; a directory of major 1 is checked as before (issue #173).
  • TieredIndex.VectorStorage and Config.withVectorStorage (configuration key vectorStorage): with MAPPED, open leaves the fp32 vectors of every segment that it reads in the mapped segment file instead of copying them into the heap, and each distance copies its row first. The default stays HEAP, because fp32 searches on mapped vectors were mostly measured slower (docs/BENCHMARKS.md). The library never unmaps; a retired segment file that Windows refuses to delete while it is mapped stays for a later checkpoint or open (docs/SEGMENT-FORMAT.md). Capability.MAPPED_VECTORS says that the option exists. Config has one more record component, and the constructors without it still exist (issue #27).
  • A partial result of a stopped search, on request: a SearchContext that returns true from the new default method partialWanted() finds in SearchCancelledException.partialHits() the best hits of the tails and segments that were read to the end, and nothing when a batch was applied during the search. Without the request nothing changes (issue #134).
  • SizedIdFilter: a LongPredicate that says how many ids it allows. When the count is at most ef, TieredIndex, GraphIndex and SealedGraph scan the allowed ids exactly instead of walking the graph; a wrong count never changes which ids may be returned. Also liveCount() and Capability.SELECTIVE_PLAN. The threshold is not measured (issue #12).
  • HostEnv: a tier that runs on the host's executor, creates no thread of its own, asks a permit before every seal, merge and rebuild, and reads a memory budget; the peak estimate is not measured (issue #13).
  • The configuration as text: Config.toMap, Config.fromMap (refuses an unknown key, for the creation of an index), Config.fromStoredMap (reports and ignores one, so a downgrade opens), and Config.fingerprint over the data-affecting settings. TieredIndex.reconfigure changes the search-time knobs graph.efSearch and splitBeam of an open index (issue #18).
  • TieredIndex.contractVersion and capabilities (ContractVersion, Capability), metrics and bindMetrics (MetricSink), health (TieredIndex.Health), and the exception base TiervecException with CorruptStateException, ClosedException, and BuildRefusedException; SearchCancelledException extends the base now (issue #18).
  • TieredIndex.MergeMode and Config.withMergeMode: with INSERT, a merge that takes the largest segment copies its graph and inserts the vectors of the other inputs instead of rebuilding everything. The default stays REBUILD, and the cost of the two has not been measured. Config has one more record component, and the constructors without it still exist (issue #16).
  • SearchContext and SearchCancelledException: the TieredIndex.search overloads that take a context stop at a deadline or a cancel flag of the host. The context is polled at least once every 1024 candidates, and a stopped search returns no partial result (issue #11). A call that passes a literal null as the fourth argument of search needs a cast now, because two overloads accept it.
  • Benchmark harness: --data reads a real embedding set that scripts/prep_real_dataset.py converts from parquet (raw float32 files with exact answers), and --engine jvector builds and searches the same data with JVector at the same M and efConstruction, in the bench profile only (JVector is not a dependency of the library). A CI smoke runs both on a small generated set (docs/BENCHMARKS.md, issue #108).
  • Benchmark harness: --quant int8 runs JVector on int8 vectors, with and without a float32 rerank, and --quant sq8 builds the tier with SQ8 codes. --targets reports latency at matched recall, --disk the size of the written index, --props checks that a write is found by the next search and that a reused id never answers with its old vector, and --shares now works with the JVector arm. The bench profile moves to JVector 4.1.0-rc.1 (issue #118).

Changed

  • TieredIndex no longer keeps a version floor map. Each hidden row of a segment carries the version at which it was hidden, and a seal or a merge marks the rows that were hidden while it built. A search no longer counts itself on a view, and awaitIdle no longer waits for searches that run on a replaced view. Stats.floorEntries and tiervec.floorEntries now count the hidden rows of the segments, which differs from the old count of ids only when one id has several hidden copies. The file format does not change. Searches and batches answer as before (issue #163).
  • Breaking: TieredIndex.open(dir, config) throws the unchecked CorruptStateException for damaged files, where it threw the checked SegmentFormat.CorruptException. Catch CorruptStateException; its cause is the old exception. UnsupportedException, MismatchException, NoSuchFileException, and the open overloads with a rebuild source behave as before (issue #18).
  • Breaking: after close, the calls that read or change vectors or files (add, delete, apply, search, rebuildFrom, sealNow, mergeNow, checkpoint) throw ClosedException. Before, most of them still worked on the memory of the closed index. A build that close interrupts throws it too, where it threw IllegalStateException (issue #18).
  • One process owns an index directory, and the library now enforces it: checkpoint and open lock the file LOCK in the directory, keep the lock until close, and throw the new DirectoryLockedException when another process holds it. The open overloads with a rebuild source throw it too and do not rebuild (issue #27).
  • checkpoint accepts a tier with deleted, replaced and re-added ids. It writes the hidden rows into the tombstone file, and open rebuilds the floor map from them. Before, it threw IllegalStateException until a merge had rewritten every segment with a hidden row. Version 0.1.x refuses a directory with a hidden row (UnsupportedException) and does not overwrite it. RecordSource.isLive is not called for an id whose copies were all hidden at the checkpoint (issue #27).

Fixed

  • sealNow, mergeNow, rebuildFrom and checkpoint get their turn while writes go on. Before, the background worker could take the lock of the builds again right after each task, so under steady writes such a call could wait for as long as the writes went on (#144).
  • The fp32 graph kernels of a JVM (VKern) sum the lanes in a fixed order, like the flat kernels. Before, the sum was reduceLanes(ADD), whose order depends on the JIT tier, so the same search could return a score one ulp apart before and after compilation. This showed as a rare failure of SegmentForgedFileTest on arm64 (#104). A score can differ from the one of 0.1.0 in the last bit.
  • A flipped bit in the major version of a segment header is damage (CorruptException, section HEADER), so TieredIndex.open falls back to the previous generation. Before, the version was read before the header CRC, and one flipped bit there in the newest segment made the whole open fail with UnsupportedException. A larger major version with an intact header is still refused (#116).
  • A flipped bit in the major version of a manifest is damage (CorruptException), so TieredIndex.open falls back to the previous generation and a later checkpoint replaces the files. Before, the version was read before the CRC: open and every checkpoint into the directory failed with UnsupportedException (#123).
  • A segment file whose first eight bytes are damaged is refused with CorruptException (section HEADER) and not UnsupportedException, and the message names the file and the field. Before, one flipped bit in the magic of the newest segment made TieredIndex.open fail, where a flipped bit in the header, footer or locator made it fall back to the previous generation. A larger major version is still an UnsupportedException that is refused, not skipped (#83).
  • TieredIndex.open flushes the directory before it deletes the files of an older generation. Before, after a process was killed between the rename of a manifest and the flush that follows it, the next open removed the previous generation while the rename was still unflushed, so a power cut at that point could leave no generation at all (#125).
  • checkpoint flushes the name of a directory that it creates into its parent. Before, a power cut after the first checkpoint into a new directory had returned could lose the whole directory (#126).

0.1.1 - 2026-11-13

The library code is unchanged from 0.1.0: no source file changed. The changes are in the release workflow and the pom.

Changed

  • Creating the GitHub release now publishes to Maven Central by itself and verifies the result (checksums, signatures, the built jars, a resolution from a fresh local repository), so the Publish click in the Central Portal is gone (docs/RELEASING.md).

0.1.0 - 2026-11-12

The first release. It is the sources of the first experiment, imported and brought to the supported surface in docs/API.md. Nothing was released under the old package name. Details are in docs/STATUS.md.

Added

  • FlatIndex: exact scan with optional SQ8 or binary codes, compaction, serialize and load.
  • GraphIndex: a concurrent HNSW graph with delete, consolidate, and optional SQ8.
  • IvfIndex: a standalone inverted-file index with lazy training, background retrain and drift detection.
  • TieredIndex: an exact tail, sealed graph segments, background merges, tombstones with a version floor, atomic batches (apply, awaitCapacity), rebuildFrom, and an opt-in scan-first plan for filtered searches (filterScanBelow).
  • Persistence of a settled tier: TieredIndex.checkpoint and TieredIndex.open, with segment files and a manifest (docs/SEGMENT-FORMAT.md), and RecordSource for reconciling a reopened tier with the records of a host database (docs/ID-EPOCH-AND-REPLAY.md).
  • Scalar twins of every kernel, used when the Vector API module is missing, and Vector API kernels for aarch64 and for GraalVM native images.
  • A GraalVM native image smoke test on Linux (x86-64 and arm64), macOS arm64 and Windows x64.
  • CI on JDK 21 and 25, with the fast tests also on arm64 and on Windows x64.
  • Community files (CONTRIBUTING, SECURITY, SUPPORT, and the issue and pull request templates) and the platform support table in the README.
  • The supported public surface and the stability policy (docs/API.md).
  • A benchmark harness for the tier (src/bench, docs/BENCHMARKS.md) with a CI smoke at 10,000 vectors. No result file is published yet.
  • Maven Central publishing for ai.humem:tiervec: the metadata Central requires in pom.xml, a release profile (sources jar, javadoc jar, GnuPG signatures, upload to the Central Portal), and the workflow release-central.yml with a dry run (docs/RELEASING.md).
  • The documentation is published as a release version with the alias latest when a version tag is pushed, and dev stays the label of main.

Changed

  • Package renamed from com.humemai.vec to ai.humem.tiervec (no other change). The system property that forces the scalar twins was renamed with it, from humemai.vec.scalar to ai.humem.tiervec.scalar.