Commit Graph

304 Commits

Author SHA1 Message Date
Jojii
b94d02ad30 Add error handling if vector is missing for point (#5211)
* add error handling for missing vectors

* add integration test

* add call without specifying 'using' parameter
2024-10-10 12:48:34 +02:00
Luis Cossío
045779233a Facets: Support for bool payload (#5100)
* enable faceting with boolean index

* test and fix

* also test uuid
2024-10-01 09:17:50 -03:00
Vamshi Maskuri
e0ab73fccb fix oom issues and add logs to monitor memory usage under high contention (#4994)
* fix oom issues and add logs to monitor memory usage under high contention

---------

Signed-off-by: Vamshi Maskuri <117595548+varshith257@users.noreply.github.com>
2024-09-15 00:06:00 +02:00
Arnaud Gourlay
4f1ccbb031 gRPC API for Distance Matrix (#5011)
* gRPC API for Distance Matrix

* generate API docs

* apply correct limit to sample

* add JWT tests

* pluralitiy

* fix COO naming

* drops COO as it trips codespell and is redundant

* clarify docs
2024-09-04 20:25:00 +02:00
Tim Visée
826c57c5f6 Bump cryptography and quinn-proto dependencies (#5017)
* build(deps): bump cryptography from 42.0.8 to 43.0.1 in /tests

Bumps [cryptography](https://github.com/pyca/cryptography) from 42.0.8 to 43.0.1.
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pyca/cryptography/compare/42.0.8...43.0.1)

---
updated-dependencies:
- dependency-name: cryptography
  dependency-type: indirect
...

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

* build(deps): bump quinn-proto from 0.11.3 to 0.11.8

Bumps [quinn-proto](https://github.com/quinn-rs/quinn) from 0.11.3 to 0.11.8.
- [Release notes](https://github.com/quinn-rs/quinn/releases)
- [Commits](https://github.com/quinn-rs/quinn/compare/quinn-proto-0.11.3...quinn-proto-0.11.8)

---
updated-dependencies:
- dependency-name: quinn-proto
  dependency-type: indirect
...

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

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-04 11:46:09 +02:00
xzfc
36b8617708 Bump certifi (#4998) 2024-09-02 09:19:11 +00:00
tellet-q
ec35d9ef3d Add tests on uuid payload index queries with filters (#4971)
* Add on_disk:True for uuid index schema check

* Add tests for uuid payload index

* Fix test

* Add test comparing filtered queries between keyword index and uuid index

* Remove order by case

* Clean up
2024-08-29 13:03:48 +02:00
Luis Cossío
797a0d58f3 fix: Non-blocking payload index building (#4941)
* separate index creation into build and apply

* check version in Segment impl of `build_field_index`

* add wait to issues test

* fix consensus tests
2024-08-23 08:30:45 -04:00
Luis Cossío
b92908f602 Add grpc endpoint for Facet (#4933)
* add grpc endpoint

* gen grpc docs
2024-08-22 14:27:25 +02:00
Andrey Vasnetsov
06e1e33f1e use chown (#4932) 2024-08-22 09:23:44 +02:00
Ivan Pleshkov
ca0cf2a4bb mmap field indices add storage compat (#4856) 2024-08-21 18:25:17 +02:00
Luis Cossío
55294b34ec fix and futureproof mismatch of index parametrization and type (#4929) 2024-08-21 17:49:20 +02:00
Luis Cossío
045fb7038c Facets in REST (#4848)
* rename to FacetRequestInternal

* add rest endpoint

* fix correctness by fetching the whole list of values

* fix mmap map index variant

Also removes test for sorted output, for now

* add ytt spec

* fix clippy

* use hashmap inside of local shard

* rename operation to `facet`, add access test

* whitelist endpoint

* change api

* make limit optional
2024-08-19 16:03:26 -04:00
Arnaud Gourlay
caeb262e86 Search distance matrix REST API (#4884)
* Search distance matrix REST API

* apply Validator upgrade

* min sample size is 2 thanks Luis

* review: rethink pair view

* remove rows-based similarity matrix output

* fmt

* upd openapi

* we have only 70 apis now

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2024-08-19 00:21:55 +02:00
Arnaud Gourlay
c8844388d7 Update Validator 0.18 (#4894)
* Update Validator 0.18

* fix new test error message

* clearer geo error message

* fix error message

* fix unit tests

* Put spaces back

---------

Co-authored-by: timvisee <tim@visee.me>
2024-08-15 15:22:51 +02:00
xzfc
50f0a6a4d4 Test payload schemas (#4822)
* test: don't parametrize test_payload_indexing.py with on_disk_vectors

* test: add test_payload_schemas()
2024-08-05 11:41:04 +02:00
Roman Titov
184f28be93 Disable resharding driver, disable resharding intergration tests, remove some TODOs (#4811) 2024-08-04 13:48:41 +02:00
xzfc
e58dbbb5be chore: move tests/openapi/openapi_integration/* → tests/openapi/* (#4820) 2024-08-03 21:44:22 +02:00
Roman Titov
c3acf332cb Add UpdateClusterMetadata consensus operation (#4766) 2024-07-31 21:34:24 +02:00
Tim Visée
7c66c5c541 Implement resharding down (#4697)
Co-authored-by: Roman Titov <ffuugoo@users.noreply.github.com>
2024-07-29 13:38:09 +02:00
Roman Titov
8065281f31 Skip test_resharding_abort test (#4759) 2024-07-26 17:37:07 +02:00
Roman Titov
f8635ca42c Abort resharding when relevant consensus events happen (#4699)
Co-authored-by: Tim Visée <tim+github@visee.me>
2024-07-26 16:00:03 +02:00
Natanael Mojica
112df0ae18 Refactor: Convert app and cluster info metrics from counters to gauges #4696 (#4733)
* Refactor: Convert app and cluster info metrics from counters to gauges

- Change app_info, app_status_recovery_mode, and cluster_enabled metrics from COUNTER to GAUGE
- Update metric values to use boolean as f64 for consistency and clarity
- Improve metric type accuracy for better representation of state information

* fix: Update docs regarding metrics type

* openapi: Update app_info metric type

* metrics: Update test to check for the right metric type
2024-07-24 08:39:24 +02:00
Luis Cossío
6fd0bf7643 universal-query: Expose random sampling query (#4657)
* expose random sampling query

* fix random query rescoring

* only ignore offset when there are no prefetches

* fix offset and with_payload/with_vector

* gen grpc docs

* make tests less flaky

* gen openapi schema

* Remove suffixed spaces

---------

Co-authored-by: timvisee <tim@visee.me>
2024-07-22 16:13:00 -04:00
Tim Visée
afa581c0ea Double timeout in resharding with concurrent updates test one more time (#4725) 2024-07-22 19:38:13 +02:00
Arnaud Gourlay
eef7e37e33 universal-search: Query group API should support lookup_from (#4706)
* universal-search: Query group API should support lookup_from

* sync docs
2024-07-19 15:45:19 +02:00
Tim Visée
61b9fe687a Give the resharding CI test with concurrent updates more time (#4687) 2024-07-18 11:30:53 +02:00
Tim Visée
728b534086 Resume resharding driver on node restart (#4666)
* Resume resharding driver on restart if resharding is active

* Update resharding state comment started text

Using since versus started. 'Since' better clarifies that the current
state has been active since that time. While 'started at' could lead to
confusion on whether that time is for starting the whole resharding
operation or just that state.

* Add resharding resumption test during migrating points

* Recover resharding hash ring after loading shards

* Update resharding resume test, interrupt at multiple stages, less points

* Remove unused parameter

* Update collection shard count at resharding shard creation/destruction

* Apply suggestions from code review

Co-authored-by: Roman Titov <ffuugoo@users.noreply.github.com>

* Use debug_assert_eq

* Remove trailing comma

---------

Co-authored-by: Roman Titov <ffuugoo@users.noreply.github.com>
2024-07-17 17:02:16 +02:00
Tim Visée
54a00da0c2 Make reads and point counts consistent during resharding (#4617)
* Apply resharding filter only to existing shards, include shard selection

* Add test for stable exact point count during resharding

* Improve filtering, only two separate requests, filtered and non-filtered

* Make scrolling stable while resharding

* Add test for stable scroll during resharding

* Make search stable while resharding

* Add test for stable search during resharding

* Remove resharding post filter in retrieve

* Also assert cardinality point count in resharding test

* Fix typos and some tweaks

* Only clone filter if resharding is active

* Also minimize cloning with resharding filter on count request

* Add test for stable exact point count during resharding with indexing

* Update lib/collection/src/shards/shard_holder/mod.rs

Co-authored-by: Roman Titov <ffuugoo@users.noreply.github.com>

* Update lib/collection/src/collection/point_ops.rs

Co-authored-by: Roman Titov <ffuugoo@users.noreply.github.com>

* Also apply resharding filter to retrieve

* Restructure resharding filter usage in `Collection::retrieve`

---------

Co-authored-by: Roman Titov <ffuugoo@users.noreply.github.com>
2024-07-16 17:22:49 +02:00
Andrey Vasnetsov
0d5eabba73 allow to use docker in backward compatibility data generator script (#4557) 2024-07-15 10:20:44 +02:00
Luis Cossío
27e28cd393 universal-query: Distribution-Based Score Fusion (#4614)
* refactor fusion into method

* expose distribution-based score fusion

* gen openapi and docs

* Better rest description

* add basic integration test
2024-07-12 08:11:59 -04:00
Arnaud Gourlay
85b0c5ba8f universal-query: gRPC group API (#4656)
* universal-query: gRPC group API

* fix jwt test

* resolve default values for CollectionQueryGroupsRequest
2024-07-11 20:13:39 +02:00
Tim Visée
ffef206da9 Do 10x more upsertions during resharding test (#4642) 2024-07-10 10:40:46 +02:00
Arnaud Gourlay
bb9f9f8e94 universal-query: Grouping REST API (#4616)
* universal-query: Grouping REST API

* add API docs

* bump API count

* add jwt validation test

* fix API

* better test

* stay on CoreSearchRequest where possible

* use existing scoring helper

* push broken test to illustrate issue

* track best score per point_id to enable sort on payload

* add example test for query discover with groups

* track ScoredPoint instead of PointId

* add default values for smoother ux
2024-07-10 08:26:57 +02:00
Tim Visée
699c70e807 Add resharding tests (#4609)
* Add basic resharding test, asserting shard and point counts

* Add resharding replica balancing test

* Always propagate deletes with wait, fix first resharding test flakyness

* Don't count points in balance test for now

* Fix resharding balance test, initial shard may not be on first node

* Count points in resharding balance test

* Test resharding with concurrent updates

* Add point data consistency check to resharding tests

* Fix not using given collection name, list point counts in debug output
2024-07-09 10:28:13 +02:00
xzfc
cf08ac68dc Switch to poetry (#4518)
* Use poetry for openapi tests

* Use poetry for consensus tests

* Use poetry for gen_storage_compat_data/populate_db.py

* Make consensus_tests scripts executable

* Use poetry for test-consensus-compose

* Cleanup

* Don't call poetry run in scripts
2024-07-08 18:17:43 +00:00
Luis Cossío
b572171145 universal-query: handle score threshold at collection level (#4630) 2024-07-08 10:48:34 -04:00
dependabot[bot]
d386c73bb9 build(deps): bump certifi in /tests/storage-compat/populate_db
Bumps [certifi](https://github.com/certifi/python-certifi) from 2023.11.17 to 2024.7.4.
- [Commits](https://github.com/certifi/python-certifi/compare/2023.11.17...2024.07.04)

---
updated-dependencies:
- dependency-name: certifi
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-08 09:14:58 +02:00
Luis Cossío
f5ccca039a universal-query: resolve offset at collection level only (#4611)
* resolve offset at collection level only

* update test

* remove offset field from `QueryScrollRequest` and `RescoreParams`
2024-07-04 08:57:05 +02:00
tellet-q
c88f10c19f Add test for OOD during indexing (#4267)
* Add test for OOD during indexing

* Start indexing right after 1st OOD message

* Only send search request after insert loop

* Fail early when encountering out-of-storage during optimization (#4578)

* fs4@0.8.4

* fail early on low storage

* move `dir_size` to `common`

* move the ood bailout to `SegmentOptimizer::optimized_segment_builder`

* drop dead code

* move dir_size to common subcrate

---------

Co-authored-by: generall <andrey@vasnetsov.com>

---------

Co-authored-by: xhjkl <xhjkl@users.noreply.github.com>
Co-authored-by: generall <andrey@vasnetsov.com>
2024-06-29 22:40:18 +02:00
Arnaud Gourlay
7c689f09db universal-query: lookup_from implementation (#4508)
* universal-query: lookup_from implementation

* pushin test demonstrating broken equivalence

* more tests and fixes

* validate fusion not use with 'using' field

* cleanup collection info propagation

* do not clone the query in CollectionQueryResolveRequest

* cleanup

* address last code review
2024-06-25 20:42:54 +02:00
Arnaud Gourlay
ee3655a355 Fix discovery API id exclusion and lookup (#4553)
* Fix discovery API id exclusion and lookup

* do not generate a filter if there are no ids to exclude
2024-06-25 16:19:41 +02:00
Ivan Pleshkov
8cab109978 Avg multivector (#4542)
* avg multivector

* integration test

* remove unwrap
2024-06-25 14:15:15 +02:00
Arnaud Gourlay
f7f4ba2592 Fix id exclusion when recommending from a different collection (#4551)
* Fix id exclusion when recommanding from a different collection

* add line at eof
2024-06-25 10:54:22 +02:00
Arnaud Gourlay
7c4809e1d3 universal-query: Add validations to query input (#4536)
* universal-query: Add validations to query input

* update openapi spec

* use raw request to by-pass local validations

* add validation for order_by and factorize
2024-06-24 16:56:36 +02:00
Luis Cossío
46b9ea44ec order_by: Begin migration to order_value in Record [v1.10] (#4526)
* begin migration to order_value

* gen openapi and grpc docs

* cargo clippy --fix

* fixup
2024-06-24 14:25:50 +02:00
Andrey Vasnetsov
d4807dcc8b Api consistency update (#4533)
* rename search_params -> params

* rename multivector_config + generate schema

* upd tests
2024-06-23 23:56:42 +02:00
Tim Visée
da6a856498 Fix new appendable segments not having payload indices (#4523)
* Propagate payload index schema down to shard replica set + update handler

* Configure payload indices when creating new appendable segment

* When loading segments, make sure applied payload indices match config

* Add test to assert creating new segments with payload index

* Fix unit test because the collection payload schema wasn't updated

* Add test for updating payload index configuration on segment load

* Update test documentation

* Also create payload indices in temporary snapshot segment

* do not delete extra payload index from segments

* do not delete extra payload index from segments

* fix test

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2024-06-21 20:01:05 +02:00
Arnaud Gourlay
1d6f3549aa universal-query: gRPC batch API (#4513)
* universal-query: gRPC batch API

* regen gRPC docs

* enable jwt access test
2024-06-20 14:10:27 +02:00
Arnaud Gourlay
51a6291956 universal-query: Fix query order_by tests (#4500) 2024-06-19 12:57:51 +02:00