Commit Graph

1704 Commits

Author SHA1 Message Date
Andrey Vasnetsov
9c5cec1b87 restore snapshot in edge (#7852)
* Restore shard snapshot in Edge python bindings

* method to request snapshot manifest

* move snapshot manifest into Shard crate

* move shapshot manifest reading

* implement inplace update of the shard from snapshot

* fmt

* move shapshot-related functions again, into a dedicated struct

* fmt

* implement partial snapshot recovery for edge

* test for partial recoverying snapshot on edge
2026-01-05 19:33:30 +01:00
xzfc
f1ee3895b6 Safe delete (#7830)
* Replace `Option<Segment>` with `enum LoadSegmentOutcome`

* Replace some Path/PathBuf with str/String

* Rename field Segment::{current_path -> segment_path}

* safe_delete
2026-01-05 08:54:29 +00:00
dependabot[bot]
d32849d154 build(deps): bump roaring from 0.11.2 to 0.11.3 (#7826)
Bumps [roaring](https://github.com/RoaringBitmap/roaring-rs) from 0.11.2 to 0.11.3.
- [Release notes](https://github.com/RoaringBitmap/roaring-rs/releases)
- [Commits](https://github.com/RoaringBitmap/roaring-rs/compare/v0.11.2...v0.11.3)

---
updated-dependencies:
- dependency-name: roaring
  dependency-version: 0.11.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-22 21:37:29 +01:00
Tim Visée
5ae5f65e18 Use RwLock in flushers, drop is alive lock early (#7811)
* Use RwLock for pending changes in MmapBitSliceBufferedUpdateWrapper

* Use RwLock for pending operations in DatabaseColumnScheduledDeleteWrapper

* Use RwLock for pending updates in DatabaseColumnScheduledUpdateWrapper

* Drop alive guard before reconciliation, we don't touch files after

* Remove redundant clone

* Update comments
2025-12-22 16:09:10 +01:00
Roman Titov
c8cf8f3559 Replace lazy_static with std::sync::LazyLock (#7808) 2025-12-19 13:22:00 +01:00
Tim Visée
e9818cab70 Fix reconciliation in more flushers (#7805)
* Reconcile BufferedDynamicFlags flusher

* Reconcile DatabaseColumnScheduledDeleteWrapper flusher

* Rename function for consistency
2025-12-19 12:14:29 +01:00
Tim Visée
ecf6554261 Switch to drain, it is simpler and recommended by docs (#7803) 2025-12-19 11:38:30 +01:00
Luis Cossío
c619cb233f Clone pending updates in buffered storages (#7801)
* in MmapSliceBufferedUpdateWrapper

* in MmapBitsliceBufferedUpdateWrapper

* in MutableIdTracker's versions updates

* in MutableIdTracker's mapping updates

* clone updates only when non-empty

* only lock for reconciling pending changes

* simpler reconciling

* use Mutex as argument to ensure we only lock within reconciliation
2025-12-18 12:15:16 -06:00
Tim Visée
4a1103acb7 Revert "return an error when cancelling a flush (#7781)" (#7799)
This reverts commit 2f443ec055.
2025-12-18 16:45:30 +01:00
Ivan Pleshkov
c14f83eff9 use enum for SQ query and meta (#7669)
fix CI

review remarks

review remarks

review remarks

review remarks

simplify encoding of internal vector

fix ci

fix ci

review remarks

review remarks
2025-12-17 22:35:14 +01:00
Luis Cossío
2f443ec055 return an error when cancelling a flush (#7781)
* return an error when cancelling a flush

* fix test

* less verbosity
2025-12-17 10:21:20 -03:00
Luis Cossío
e1b38e1723 [feedback query] Rename to Naive strategy (#7756)
* Rename to `Naive` strategy. Remove generic `TStrategy`

* refactor in async_raw_scorer too

* review nit
2025-12-16 15:17:25 -03:00
Luis Cossío
a89f309645 new GridstoreError (#7780)
* create GridstoreError

* review nit
2025-12-16 12:04:25 -03:00
dependabot[bot]
260b68fbdb build(deps): bump ndarray from 0.16.1 to 0.17.1 (#7772)
* build(deps): bump ndarray from 0.16.1 to 0.17.1

Bumps [ndarray](https://github.com/rust-ndarray/ndarray) from 0.16.1 to 0.17.1.
- [Release notes](https://github.com/rust-ndarray/ndarray/releases)
- [Changelog](https://github.com/rust-ndarray/ndarray/blob/master/RELEASES.md)
- [Commits](https://github.com/rust-ndarray/ndarray/compare/0.16.1...0.17.1)

---
updated-dependencies:
- dependency-name: ndarray
  dependency-version: 0.17.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* bump ndarray-npy as well

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Arnaud Gourlay <arnaud.gourlay@gmail.com>
2025-12-16 15:28:36 +01:00
dependabot[bot]
34df3ff720 build(deps): bump geo from 0.31.0 to 0.32.0 (#7770)
Bumps [geo](https://github.com/georust/geo) from 0.31.0 to 0.32.0.
- [Changelog](https://github.com/georust/geo/blob/main/CHANGES.md)
- [Commits](https://github.com/georust/geo/compare/geo-0.31.0...geo-v0.32.0)

---
updated-dependencies:
- dependency-name: geo
  dependency-version: 0.32.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-16 08:06:52 +01:00
Roman Titov
1bf968bd10 Implement __repr__ for Qdrant Edge types (#7695)
* Refactor `PyUpdateOperation` constructors

* Add default parameters to `PyVectorDataConfig::new`

* Add `Repr` trait and `WriteExt` helper

* Implement `__repr__` for config types

* fixup! Implement `__repr__` for config types

Use `Copy` instead of `Clone`

* fixup! Implement `__repr__` for config types

Add basic test

* Implement `__repr__` for `PyPointId`

* Implement `__repr__` for `PyVector`

* Implement `__repr__` for `PyVectorInternal`

* Implement `__repr__` for `PyPayload`

* Implement `__repr__` for `PyValue`

* Implement `__repr__` for `PyPoint`

* Implement `__repr__` for `PyPointVectors`

* Implement `__repr__` for `PyRecord`

* Move `PyScoredPoint` into a separate file

* Implement `__repr__` for `PyScoredPoint`

* Cleanup examples

* fixup! Implement `__repr__` for `PyScoredPoint`

* Move `PyOrderValue` into separate file

* Add `PyScoredPoint::order_value`

* Implement `pyclass_repr` proc-macro attribute

* Implement `__repr__` for config types using `pyclass_repr` attribute

* Implement `__repr__` for `PySparseVector` using `pyclass_repr` attribute

* Implement `__repr__` for `PyPoint` using `pyclass_repr` attribute

* Implement `__repr__` for `PyPointVectors` using `pyclass_repr` attribute

* Implement `__repr__` for `PyRecord` using `pyclass_repr` attribute

* Implement `__repr__` for `PyScoredPoint` using `pyclass_repr` attribute

* Minor fixes and cleanups

* fixup! Minor fixes and cleanups

* rollback copy for quantization config

* rollback copy for quantization config

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2025-12-16 02:17:37 +01:00
Luis Cossío
4e91702fe8 Introduce IsAliveLock (#7751)
* introduce IsAliveLock

* add tests

* rename to mark_dead

* update gridstore comment

* Update some comments

* Add must_use attribute to lock_if_alive

* Rename mark_dead to blocking_mark_dead

* make the handle take a `Weak` reference

* make dropping explicit

* use `Mutex::lock_arc` instead

* less nesting

* clippy

---------

Co-authored-by: timvisee <tim@visee.me>
2025-12-15 12:22:30 -03:00
Arnaud Gourlay
104f6ab4eb Fix Clippy v1.92 (#7748) 2025-12-11 17:05:24 +01:00
Arnaud Gourlay
76bfa2ef7c Fix to run all tests on CI (#7732)
* Fix to run all tests on CI

* adjust for macos since we bumped rocksdb

* more flags
2025-12-09 11:09:52 +01:00
dependabot[bot]
36b8c0a58d build(deps): bump self_cell from 1.2.0 to 1.2.1 (#7724)
Bumps [self_cell](https://github.com/Voultapher/self_cell) from 1.2.0 to 1.2.1.
- [Release notes](https://github.com/Voultapher/self_cell/releases)
- [Commits](https://github.com/Voultapher/self_cell/compare/v1.2.0...v1.2.1)

---
updated-dependencies:
- dependency-name: self_cell
  dependency-version: 1.2.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-09 08:03:36 +01:00
xzfc
77c71712db Indexing progress (#7625)
* Add progress_tracker.rs

* Pass progress tracker around

* Populate progress tracker with actual data

* Expose progress on `/collections/{name}/optimizations` endpoint
2025-12-09 00:15:36 +00:00
Kumar Shivendu
1962d89978 Log snapshot download duration (#7715)
* Log snapshot download duration

* only 2 digits in filesize

* Log for normal snapshots too

* fmt

* Log download stats for s3 snapshot API and cleanup
2025-12-09 01:13:09 +05:30
Copilot
8954a499f1 Use Duration type for timeout errors instead of truncating to seconds (#7689)
* Initial plan

* Update timeout error handling to use milliseconds for better precision

Co-authored-by: agourlay <606963+agourlay@users.noreply.github.com>

* Use Duration type and debug format for timeout errors

Changed timeout() methods to accept Duration directly instead of u128 milliseconds.
This uses Rust's built-in Duration debug formatting ({:?}) which provides clean output:
- Sub-second: "500ms"
- Exact seconds: "1s"
- Mixed: "2.5s"

Updated all call sites to pass Duration directly instead of timeout.as_millis().

Co-authored-by: agourlay <606963+agourlay@users.noreply.github.com>

* fmt/clippy

* make it consistent

* Inline some arguments and imports

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: agourlay <606963+agourlay@users.noreply.github.com>
Co-authored-by: Arnaud Gourlay <arnaud.gourlay@gmail.com>
Co-authored-by: timvisee <tim@visee.me>
2025-12-05 11:27:51 +01:00
Tim Visée
64690cda53 Hotfix for Windows ARM64 builds, disable some Neon features (#7690)
* On Windows ARM64 builds, disable usage of neon

* Also disable optimized popcount on Windows ARM64

* fix quantization build

* revert changes in BQ

---------

Co-authored-by: Ivan Pleshkov <pleshkov.ivan@gmail.com>
2025-12-05 10:56:48 +01:00
Arnaud Gourlay
da8ccdd253 Timeout on point retrieve when acquiring segment holder (#7588)
* Timeout on point retrieve when acquiring segment holder

* review: less radical and cleaner

* highly embarassing I hope no one sees this!

* coderabbit
2025-12-04 15:26:40 +01:00
Roman Titov
bc7b76c0db Qdrant Edge Python bindings improvements (Part 2) (#7639) 2025-12-04 12:02:21 +01:00
Luis Cossío
d79cd9b99b activate fs-err features for nicer error messages (#7665)
* activate fs-err features for nicer error messages

* use in entire workspace
2025-12-02 10:40:36 -03:00
Arnaud Gourlay
86ced6d89a Fix payload indexes drop/flush sequence (#7626)
* Fix release mmap handles before removing files

* weak references to handle after drop

* protect from concurrent drop/flush

* simplify locking

* Revert "simplify locking"

This reverts commit 7ebd324be4.
2025-12-02 10:27:48 +01:00
dependabot[bot]
b2cce0fb90 build(deps): bump io-uring from 0.7.10 to 0.7.11 (#7656)
Bumps [io-uring](https://github.com/tokio-rs/io-uring) from 0.7.10 to 0.7.11.
- [Commits](https://github.com/tokio-rs/io-uring/commits/v0.7.11)

---
updated-dependencies:
- dependency-name: io-uring
  dependency-version: 0.7.11
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-01 19:31:46 -03:00
Tim Visée
4010e7219f Add runtime flag to disable opening multiple mmaps on the same file (#7614)
* Fix delete_page not dropping sequential mmap

* In Gridstore Page, support using a single mmap

* In Gridstore Page, only open multiple mmaps if supported at runtime

* Support opening single mmap in UniversalMmapChunk

* Rename environment var, log warning when QDRANT_NO_MULTI_MMAP is set

* Support opening single mmap in MmapDenseVectors

* Remove unused result response

* Import LazyLock
2025-12-01 18:34:05 +01:00
Ivan Pleshkov
8df3dda006 Scalar quantization encoding parameter (#7602)
* scalar quantization encoding parameter

fix ci

remove method

review remarks

fix ci

* uint8 - int8
2025-12-01 12:03:36 +01:00
Arnaud Gourlay
9b5cca03ae Standardize delete payload index terminology (#7630) 2025-11-27 16:01:00 +01:00
Luis Cossío
6ca3e46638 Fix wiping of Gridstore (#7627)
* fix wiping of gridstore

* clippy

* address @timvisee's review
2025-11-27 11:38:19 -03:00
Arnaud Gourlay
3babcfb1df Fix BufferedDynamicFlags flushing with concurrent drop/deletion (#7621)
* Fix BufferedDynamicFlags flushing with concurrent drop/deletion

* make sure to drop before fs remove
2025-11-27 14:18:56 +01:00
Ivan Boldyrev
2a7fc718fa Fix search in empty HNSW segments (#7620)
* Add top==0 tests

* Fix HNSW scan top==0 error
2025-11-27 18:56:10 +07:00
Roman Titov
5ba7ac8ee8 Qdrant Edge Python bindings improvements (#7561)
* Use anonymous lifetime in `FromPyObject` implementations

* Use `PyResult` in `IntoPyObject` implementations

* Cleanup imports and derives

* Cleanup `filter` conversions

* Add `PointVectors` getters

* Move `config` module into sub-directory

* Split `config` into sub-modules

* Simplify enum bindings

* Add zero-cost conversions for `PyVectorDataConfig` and `PySparseVectorDataConfig`

* Add getters to config structures

* fixup! Add getters to config structures

More zero-cost conversions for `PyVector*DataConfig`

* Implement `PyHnswIndexConfig`

* Implement `PyQuantizationConfig`

* fixup! Simplify enum bindings

* fixup! Implement `PyHnswIndexConfig`

* fixup! Implement `PyHnswIndexConfig`

* fixup! Implement `PyHnswIndexConfig`

* Implement `PySparseVectorDataConfig`

* fixup! Implement `PySparseVectorDataConfig`

* fixup! Implement `PySparseVectorDataConfig`
2025-11-26 18:47:17 +01:00
Tim Visée
57ad76db98 Disable RocksDB features in local development builds (#7552)
* Disable rocksdb compile time feature by default

* Also disable RocksDB feature in segment crate

* Enable RocksDB feature in all CI builds

* Remove extra job for testing non-RocksDB build, it's the default now

* Keep RocksDB structures in generated OpenAPI schema

* Fix obsolete --workspace flag breaking builds with explicit features

* Also build including RocksDB in e2e tests on CI
2025-11-25 17:29:50 +01:00
Tim Visée
b7394ce85e Bump rocksdb dependency to 0.24.0 (#7605) 2025-11-25 16:44:44 +01:00
Ivan Pleshkov
c737d9d087 P-Square one pass quantile estimation method (#7520)
* p square one pass method

* are you happy fmt

* fix n=9 case

* marker struct

* refactor

* proper tests

* add bench

* better namings

* are you happy clippy

* are you happy clippy

* fix additional markers order

* use ArrayVec instead of SmallVec

* use orderer float to sort f64

* Update lib/quantization/src/p_square.rs

Co-authored-by: xzfc <5121426+xzfc@users.noreply.github.com>

* Update lib/quantization/src/p_square.rs

Co-authored-by: xzfc <5121426+xzfc@users.noreply.github.com>

* mispelling

* review remarks

* fix typo

* change float checks order

---------

Co-authored-by: xzfc <5121426+xzfc@users.noreply.github.com>
2025-11-21 20:21:32 +03:00
Ivan Boldyrev
b5825c1245 Use batch searcher for sparse vector search (#7572)
It allows to remove `peek_*` methods from `FilteredScorer`, simplifying
code.
2025-11-21 20:29:24 +07:00
Andrey Vasnetsov
43f0c73bf2 fix default rescoring param choice for quantization rescoring (#7570) 2025-11-20 12:21:28 +01:00
Ivan Boldyrev
428f1e76d4 Batched scans for dense vectors (#7514)
* Batched iteration for plain `HNSWIndex` searches
* Batched iteration for `PlainVectorIndex` search
2025-11-20 17:34:02 +07:00
Tim Visée
8bbeda5783 Add deferred flusher to Gridstore (#7446)
* Wrap the tracker and bitmask in Arc

* Implement deferred flusher for gridstore, defer tracker writes

* Remove clone

* Dynamically adjust list of pending updates to drain what is flushed

* Return proper flusher, defer premature Gridstore flushing errors

* Use deferred Gridstore flusher across storages

* Remove all Arc<RwLock<_>> wrappers around Gridstore in storages

* Flush pages inside closure, also wrap them in a lock

* Remove direct flush function from Gridstore

* Add test to assert behavior of deferred flushing in Gridstore

* Add much more extensive test, including concurrent flushes and deletes

* Add test for draining value pointer, make sure to drop when flushed

* Feature gate RocksDB components
2025-11-18 14:21:43 +01:00
Andrey Vasnetsov
ccabe47a08 more stop flags (#7531)
* add stopflag check into query_points of payload index

* propagate stopflag more

* fmt

* bench: compare better against no atomic

* use stoppable iter with IteratorExt

* clippy

* Add cancelled error helper

---------

Co-authored-by: Luis Cossío <luis.cossio@outlook.com>
Co-authored-by: timvisee <tim@visee.me>
2025-11-14 10:58:04 +01:00
Arnaud Gourlay
204a27f3bc Fix missing version debug log (#7524)
* Fix missing version debug log

* we do not need curly braces where we are going
2025-11-12 17:18:44 +01:00
Roman Titov
6bca83c568 Cleanup edge_py::types::filter module (#7490)
Co-authored-by: generall <andrey@vasnetsov.com>
2025-11-10 17:44:12 +01:00
Roman Titov
9aea6e1b95 Fix clippy 🙄 (#7486)
Co-authored-by: timvisee <tim@visee.me>
2025-10-31 12:59:27 +01:00
Tim Visée
c85c8db7fe Add repr(C) attribute to type used in MmapSlice (#7472) 2025-10-29 17:14:12 +01:00
Jojii
48d61f1719 Metrics vectors by name per collection (#7441)
* Add vector count per vector-name to metrics API

* Add to metrics API

* Improve TinyMap::get_or_insert_default and add tests

* Minor improvements

* Update openapi

* Review remarks

* Remove `collection_vectors` since it can be calculated manually
2025-10-29 17:00:53 +01:00
xzfc
3b55f856f4 Don't reuse links with vectors, optimize OldIndexCandidate::evaluate (#7467)
* links_empty

* Don't reuse links with vectors

* review fixes

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2025-10-29 13:27:30 +01:00