Commit Graph
813 Commits
Author SHA1 Message Date
Andrey Vasnetsov b5f4720c59 up to v1.1.1 (#1700) 2023-04-11 19:36:46 +02:00
Luis Cossío 4ac3c6a867 feat: [http] alias with_vector <-> with_vectors (#1697) 2023-04-11 18:21:33 +02:00
Andrey Vasnetsov 0a8973c85d make is-empty condition consistent with all other conditions (#1698)
* make is-empty condition consistent with all other conditions

* review and clippy
2023-04-11 18:21:27 +02:00
Tim Visée 044ccf57e9 Revert clamp usage to prevent panic at runtime with high ef_limit values (#1692) 2023-04-11 14:32:09 +02:00
dependabot[bot] 414bc8458a Bump uuid from 1.3.0 to 1.3.1 (#1689)
Bumps [uuid](https://github.com/uuid-rs/uuid) from 1.3.0 to 1.3.1.
- [Release notes](https://github.com/uuid-rs/uuid/releases)
- [Commits](https://github.com/uuid-rs/uuid/compare/1.3.0...1.3.1)

---
updated-dependencies:
- dependency-name: uuid
  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>
2023-04-11 14:31:38 +02:00
Tim Visée 868626f409 Add vector specific quantization configuration (#1680)
* Add QuantizationConfigDiff type

* Add quantization config diff to vector parameters

* Prefer vector config over collection config for quantization

* Update OpenAPI specification

* Validate quantization configuration quantile in 0.5-1.0 range

As per https://github.com/qdrant/qdrant/pull/1681

* Add test if check if vector specific quantization config is persisted

* Alias quantization to quantization_config in vector parameters

* Remove quantization config diff, use full vector specific config instead

* Regenerate OpenAPI specification and gRPC docs

* Fix compilation error

* Add error handling to quantization config conversions

* Fix quantization integration test, make HNSW test stricter
2023-04-11 14:31:34 +02:00
Luis CossíoandAndrey Vasnetsov e1d494d6be Include "last_responded" in telemetry (#1668)
* feat: include "last_queried" in /telemetry

* fix: anonymize responses in the WebApiTelemetry and GrpcTelemetry Anonymize impls

* fix: anonymize the last_queried field

* fix: use YYYY/MM/DD hh:mm:ss format on 'last_queried'

* tests: add and fix telemetry test

* refactor: rename last_queried -> last_responded

* cargo fmt

* update openapi models

* refactor: rename last_request_time -> last_response_date

* tests: update test

* review changes

* add chrono to schemars

---------

Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2023-04-11 14:31:28 +02:00
Tim Visée c3c968881b General improvements (#1687)
* Change file mode of some .sh files to make them executable

* Remove whitespace on empty lines from YAML configurations

* Fix unused import warning on Windows
2023-04-11 14:31:22 +02:00
Tim ViséeandAndrey Vasnetsov 66ba8f17af Add vector specific HNSW configuration (#1675)
* Validate VectorConfig/VectorParams, remove obsolete validation

* Add HNSW config diff to vector parameters

* Validate params in collection config

* Add HNSW config to segment vector data config

* Add VectorsConfig params iterator for more elegant conversions

* Prefer vector HNSW config over collection config for building HNSW index

* Base segment vector param HNSW config on collection config

* General improvements

* Rewrite HNSW ef_construct extract function to also consider vector configs

* Update OpenAPI specification

* Add test to check if vector specific HNSW config is persisted

* review changes

* review changes

* Regenerate gRPC docs

* Fix test on Windows

* Regenerate OpenAPI specification

---------

Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2023-04-11 14:31:18 +02:00
Tim Visée c4c78e2b2d Add validation to gRPC (#1634)
* Implement validation on generated gRPC point types

* Validate gRPC point API requests

* Nicely describe validation errors

* Add validation extensions for special types used in gRPC

* Validate gRPC collection API requests

* Validate gRPC Raft and snapshot API requests

* Simplify validation builder, guess derives from fields, fix two fields

* Remove point recommending limit constraint to fix gRPC tests

* Clean up validation logic for gRPC in build.rs

* Validate internal gRPC requests, don't error but show warnings in log

* Optimize gRPC validation extensions, remove unused bits

* Validate gRPC collection creation configuration

* Add custom validators for special gRPC types

* Value is automatically attached to validation error

* Cleanup

* Remove obsolete tests

* Add basic gRPC validation test

* Add some gRPC request payload validation tests

* Set max collection name length to 255 in validation to match Actix
2023-04-11 14:31:12 +02:00
Tim Visée 6f15aa21c8 Simplify for loop picking a minimum item (#1686)
See https://github.com/qdrant/qdrant/pull/1682#discussion_r1161605970
2023-04-11 14:31:08 +02:00
Tim Visée e8002b2781 Verify quantization configuration on collection creation (#1681)
* Verify quantization configuration on collection creation

* Update OpenAPI specification

* Update range in doc to match validation definition

* Update OpenAPI specification
2023-04-11 14:30:54 +02:00
Andrey Vasnetsov 623f3bffe1 Try to fix dying shards (#1682)
* use common channel pool for healthcheck requests

* add dynamic channel pool

* fmt

* lower parallel connections num

* fmt

* fix clippy

* fix clippy

* better status error message

* smarter channel dropping conditions

* per-channel stats

* refactor pool

* rollback dockerfile

* health-check timeout

* prevent reporting last active peer as dead

* introduce update rate limit

* only rate-limit client requests

* ability to save snapshot without locking wal (#1685)

* ability to save snapshot without locking wal

* fix empty wal saving

* skip waiting on local shard in listener mode even if it is a direct request to listener shard

* snapshot recovery test + better handling of segment versions

* use latest wal

* review changes
2023-04-11 14:30:50 +02:00
Ivan Pleshkov 199ecc6099 additional deleted checks in raw scorers (#1674) 2023-04-11 14:30:40 +02:00
Ivan Pleshkov 1eb4ec4885 fix search one day bug (#1672) 2023-04-11 14:30:33 +02:00
Arnaud Gourlay 6676c7ab09 Fix possible double read on replica_state (#1671)
* Fix possible double read on replica_state

* linting
2023-04-11 14:30:27 +02:00
Roman TitovandAndrey Vasnetsov e7a5dc88b0 Fix node failure during highly parallel updates (#1661)
* Wrap blocking `SaveOnDisk::wait_for` call with `tokio::task::spawn_blocking`

* remove waiting for deactivation completely

* Un-`Arc` `SaveOnDisk` structure

* Revert "remove waiting for deactivation completely"

This reverts commit 95c02a11db.

* Revert "Un-`Arc` `SaveOnDisk` structure"

This reverts commit b64ea6a11d.

* remove unwrap

---------

Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2023-04-11 14:30:19 +02:00
Arnaud Gourlay 8350652553 Use latest WAL 1a6bb8 (#1666) 2023-04-11 14:30:12 +02:00
Roman Titov ce39ce7cf3 Fix ForwardProxyShard::update error handling (#1638)
Refactor `ForwardProxyShard::update` to separate failure of the local shard from the failure of the remote shard.

TODO:
- Figure a way to return the result of the local shard (regardless of status of remote shard)...
- ...and also handle the failure of remote shard
2023-04-11 14:25:19 +02:00
Andrey Vasnetsov e43e24deb2 Restore is empty functions as before (#1657)
* is_empty should match with value=null

* fmt
2023-04-11 13:46:16 +02:00
de93c75bf3 feat: add wait param for all snapshot API (#1571)
* feat: add wait parm for all snapshot API

* update openAPI

* avoid unwrap

* remove all unwarp

* return HTTP 202 when no waiting on snapshot creation

* return 202 when non wait

* update open API

* update param on python test

* update and test api

* optimize the test

* return 202 when non-wait delete

* recover fixes

---------

Co-authored-by: Arnaud Gourlay <arnaud.gourlay@gmail.com>
Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2023-04-11 13:42:11 +02:00
dependabot[bot] 7d257f90fd Bump tonic-build from 0.9.0 to 0.9.1 (#1648)
Bumps [tonic-build](https://github.com/hyperium/tonic) from 0.9.0 to 0.9.1.
- [Release notes](https://github.com/hyperium/tonic/releases)
- [Changelog](https://github.com/hyperium/tonic/blob/master/CHANGELOG.md)
- [Commits](https://github.com/hyperium/tonic/compare/v0.9.0...v0.9.1)

---
updated-dependencies:
- dependency-name: tonic-build
  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>
2023-04-11 13:42:04 +02:00
dependabot[bot] 9f71117a8a Bump tonic from 0.9.0 to 0.9.1 (#1650)
Bumps [tonic](https://github.com/hyperium/tonic) from 0.9.0 to 0.9.1.
- [Release notes](https://github.com/hyperium/tonic/releases)
- [Changelog](https://github.com/hyperium/tonic/blob/master/CHANGELOG.md)
- [Commits](https://github.com/hyperium/tonic/compare/v0.9.0...v0.9.1)

---
updated-dependencies:
- dependency-name: tonic
  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>
2023-04-11 13:41:58 +02:00
dependabot[bot]andArnaud Gourlay 3f801e5c37 Bump tonic from 0.8.3 to 0.9.0 (#1636)
* Bump tonic from 0.8.3 to 0.9.0

Bumps [tonic](https://github.com/hyperium/tonic) from 0.8.3 to 0.9.0.
- [Release notes](https://github.com/hyperium/tonic/releases)
- [Changelog](https://github.com/hyperium/tonic/blob/master/CHANGELOG.md)
- [Commits](https://github.com/hyperium/tonic/commits)

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

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

* tonic-build 0.9.0

---------

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>
2023-04-11 13:41:11 +02:00
Ivan Pleshkovandtimvisee f0f92292e0 Add Actix and config validation (#1463)
* actix validation

* add check for memmap/indexing_threshold

* fix actix json settings

* Validate settings configuration on start, print pretty warnings on fail

* Add more validation rules for settings and nested types

* Move shared validation logic into collection/operations

* Show validation warning in log when loading some internal configs

* Show prettier actix JSON validation errors

* Stubs for pretty handling of query errors, reformat validation errors

* Use crate flatten function, the hard work was already done for us

We don't have to flatten validation errors into their qualified field
names ourselves because there is a utility function for this.

* Configure actix path validator

* Actix endpoints don't require public

* Extend validation to more actix types

* Validate all remaining actix path and query properties

* Rephrase range validation messages to clearly describe they're inclusive

* Validate all query params to respond with pretty deserialize errors

* Nicely format JSON payload deserialize error responses

* Improve error reporting for upsert point batches

* Add basic validation test that checks a path, query and payload value

* Add some validation constraints

* Add simple validation error render test

* Update Cargo.lock

---------

Co-authored-by: timvisee <tim+github@visee.me>
2023-04-11 13:41:06 +02:00
Ibrahim M. Akrab 2ddce557b2 add isNull condition for payload filtering (#1617)
* add minimal working is_null filter

* add is_null condition to grpc api (backward compatible)

* add unit tests is_null and is_empty conditions

* add is_null to  points.proto file

* add some failing OpenAPI tests

* fix a failing test due to change in collection data

* refactor MultiValue's check for is_null

* fix is_empty condition not picking up "key":[]

* remove duplicate OpenAPI integration test

* reuse same variable in condition checker tests

* update grpc docs

* fix is_null cardinality estimation to match is_empty

* update openapi specs

* remove unused debug statements

* add new test points to original test_collection

* fix failing tests according to newly added points

* add the `"key":[null]` test_case
2023-04-11 13:40:59 +02:00
Tim Visée aba556f27d Synchronize used tonic features to fix missing TLS in sub module (#1633) 2023-04-11 13:40:52 +02:00
dependabot[bot] 48d5a3fbb9 Bump futures from 0.3.27 to 0.3.28 (#1630)
Bumps [futures](https://github.com/rust-lang/futures-rs) from 0.3.27 to 0.3.28.
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.27...0.3.28)

---
updated-dependencies:
- dependency-name: futures
  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>
2023-04-11 13:40:20 +02:00
Tim Visée f34095785c Fix metrics vector count (#1627)
* Fix total vector count in metrics

* Resolve TODO
2023-04-11 13:40:07 +02:00
dependabot[bot] bc8666209f Bump tempfile from 3.4.0 to 3.5.0 (#1623)
Bumps [tempfile](https://github.com/Stebalien/tempfile) from 3.4.0 to 3.5.0.
- [Release notes](https://github.com/Stebalien/tempfile/releases)
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/NEWS)
- [Commits](https://github.com/Stebalien/tempfile/commits)

---
updated-dependencies:
- dependency-name: tempfile
  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>
2023-04-11 13:39:46 +02:00
dependabot[bot] 9bb7d80cb8 Bump tokio from 1.26.0 to 1.27.0 (#1618)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.26.0 to 1.27.0.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.26.0...tokio-1.27.0)

---
updated-dependencies:
- dependency-name: tokio
  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>
2023-04-11 13:39:23 +02:00
Roman Titov 7d541781d9 Wrap blocking await_ready_for_timeout call with tokio::task::spawn_blocking (#1608) 2023-04-11 13:39:17 +02:00
dependabot[bot] db83b32d2a Bump async-trait from 0.1.67 to 0.1.68 (#1613)
Bumps [async-trait](https://github.com/dtolnay/async-trait) from 0.1.67 to 0.1.68.
- [Release notes](https://github.com/dtolnay/async-trait/releases)
- [Commits](https://github.com/dtolnay/async-trait/compare/0.1.67...0.1.68)

---
updated-dependencies:
- dependency-name: async-trait
  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>
2023-04-11 13:39:05 +02:00
Arnaud Gourlay 67c81f6851 Handle ties scores in test assertions (#1597) 2023-04-11 13:38:47 +02:00
dependabot[bot] 71a0b2b594 Bump geo from 0.24.0 to 0.24.1 (#1599)
Bumps [geo](https://github.com/georust/geo) from 0.24.0 to 0.24.1.
- [Release notes](https://github.com/georust/geo/releases)
- [Changelog](https://github.com/georust/geo/blob/main/CHANGES.md)
- [Commits](https://github.com/georust/geo/compare/geo-0.24.0...geo-0.24.1)

---
updated-dependencies:
- dependency-name: geo
  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>
2023-04-11 13:38:31 +02:00
Tushar DahiyaandArnaud Gourlay 8aa0c71ae7 fixed typos in *.proto files (#1569)
* Update README.md

* Update DEVELOPMENT.md

* Update docs.md

* Update roadmap-2022.md

* Update collections.proto

* Update collections.proto

* Update json_with_int.proto

* Update points.proto

* Update points_service.proto

* fixes and resync

---------

Co-authored-by: Arnaud Gourlay <arnaud.gourlay@gmail.com>
2023-04-11 13:38:25 +02:00
dependabot[bot] 3e09d169a5 Bump ordered-float from 3.5.0 to 3.6.0 (#1596)
Bumps [ordered-float](https://github.com/reem/rust-ordered-float) from 3.5.0 to 3.6.0.
- [Release notes](https://github.com/reem/rust-ordered-float/releases)
- [Commits](https://github.com/reem/rust-ordered-float/compare/v3.5.0...v3.6.0)

---
updated-dependencies:
- dependency-name: ordered-float
  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>
2023-04-11 13:37:44 +02:00
Ibrahim M. AkrabandAndrey Vasnetsov 21641346aa add upload snapshot functionality using multipart request (#1578)
* add upload snapshot functionality using multipart request

* remove unnecessary printing

* Add proper error handling

* add snapshot upload integration tests

* Fix maximum uploaded snapshot size limit

* review changes

* update OpenAPI with upload endpoint

* add missed query param in openapi

* remove unused function

---------

Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2023-04-11 13:37:39 +02:00
dependabot[bot] adb148b5b6 Bump async-trait from 0.1.66 to 0.1.67 (#1592)
Bumps [async-trait](https://github.com/dtolnay/async-trait) from 0.1.66 to 0.1.67.
- [Release notes](https://github.com/dtolnay/async-trait/releases)
- [Commits](https://github.com/dtolnay/async-trait/compare/0.1.66...0.1.67)

---
updated-dependencies:
- dependency-name: async-trait
  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>
2023-04-11 13:37:32 +02:00
Arnaud GourlayandRoman Titov b43dd6876b Update to Raft-rs 0.7.0 (#1568)
* Raft-rs 0.7.0

* Remove `request_index` field from `ConsensusOperations::RequestSnapshot` message

---------

Co-authored-by: Roman Titov <ffuugoo@users.noreply.github.com>
2023-04-11 13:35:43 +02:00
Arnaud Gourlay e5269b361e Increase drop data timeout to accomodate for larger segments (#1595) 2023-04-11 13:35:38 +02:00
dependabot[bot] f88731aea0 Bump ordered-float from 3.4.0 to 3.5.0 (#1590)
Bumps [ordered-float](https://github.com/reem/rust-ordered-float) from 3.4.0 to 3.5.0.
- [Release notes](https://github.com/reem/rust-ordered-float/releases)
- [Commits](https://github.com/reem/rust-ordered-float/compare/v3.4.0...v3.5.0)

---
updated-dependencies:
- dependency-name: ordered-float
  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>
2023-04-11 13:35:19 +02:00
dependabot[bot] 1f4e32587e Bump anyhow from 1.0.69 to 1.0.70 (#1587)
Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.69 to 1.0.70.
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.69...1.0.70)

---
updated-dependencies:
- dependency-name: anyhow
  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>
2023-04-11 13:35:14 +02:00
stencillogic d50b93f06f Add tls support (#1581)
* add TLS support

* update github workflow

* fix formatting

* fix tests

* fix clippy warning

* fix PR remarks
2023-04-11 13:34:57 +02:00
Andrey Vasnetsov b452ed2d94 v1.1.0 (#1579) 2023-03-17 17:33:49 +01:00
dependabot[bot] 9f0746b4c4 Bump walkdir from 2.3.2 to 2.3.3 (#1574)
Bumps [walkdir](https://github.com/BurntSushi/walkdir) from 2.3.2 to 2.3.3.
- [Release notes](https://github.com/BurntSushi/walkdir/releases)
- [Commits](https://github.com/BurntSushi/walkdir/compare/2.3.2...2.3.3)

---
updated-dependencies:
- dependency-name: walkdir
  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>
2023-03-17 14:11:41 +01:00
Ivan Pleshkov 25709c449e fix remove geo index (#1566) 2023-03-15 16:32:27 +01:00
dependabot[bot] 2abc3680e0 Bump futures from 0.3.26 to 0.3.27 (#1559)
Bumps [futures](https://github.com/rust-lang/futures-rs) from 0.3.26 to 0.3.27.
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.26...0.3.27)

---
updated-dependencies:
- dependency-name: futures
  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>
2023-03-15 16:32:20 +01:00
Ivan PleshkovandAndrey Vasnetsov e3448c0056 Remove deleted flags from vector storage (#1561)
* remove deleted flags from vector storage

* remove deleted flags from mmap

* new simple vector storage format

* are you happy clippy

* remove id_tracker from raw_scorer

* revert vector storage format changes

---------

Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2023-03-15 16:32:06 +01:00
dependabot[bot] e4fa6e0741 Bump semver from 1.0.16 to 1.0.17 (#1560)
Bumps [semver](https://github.com/dtolnay/semver) from 1.0.16 to 1.0.17.
- [Release notes](https://github.com/dtolnay/semver/releases)
- [Commits](https://github.com/dtolnay/semver/compare/1.0.16...1.0.17)

---
updated-dependencies:
- dependency-name: semver
  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>
2023-03-15 16:31:39 +01:00