Commit Graph

30 Commits

Author SHA1 Message Date
Andrey Vasnetsov
bf87170db3 promotion integration test (#7511)
* test with background update process

* fmt

* remove unused imports

* Remove unused import

---------

Co-authored-by: timvisee <tim@visee.me>
2025-11-11 11:50:13 +01:00
Andrey Vasnetsov
fe06b8559d simple integration test for tenant promotion (#7503)
* simple integration test for tenant promotion

* add cleanup after promotion

* When switching to ReadActive state, set it for the correct peer ID

* fix test

---------

Co-authored-by: timvisee <tim@visee.me>
2025-11-10 17:42:05 +01:00
Kumar Shivendu
9f0779ed16 Respect payload filters while replicating point (#7362)
* Respect payload and hashring filters while replicating point

* Merge points instead of replacing for filtered stream records transfer

* cleanup

* Update utils

* Allow filters in transfer

* drop hashring filter since its not required when destination has single shard

* test comment

* Pass actual filter

* use exact=True

* Forward updates that satisfy the filter

* make test long enough for extra points to be upserted

* minor improvements

* fix test

* try with only inserting new points

* Temporarily forward points that match before or after

* Fix failing test

* Only do inserts

* Dont merge points and update old points in test

* Fix the bug in integration test

* fix read_batch_with_hashring fn name and docs

* changes after rebase

* add validation check

* apply suggestions

* Always trim clock tag when forwarding to a different shard ID

* review fixes

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2025-10-29 19:41:55 +05:30
Kumar Shivendu
a4220fdd84 Partial snapshots update recovery ts (#6980)
* Update recovery ts despite empty partial snapshots

* fmt

* apply suggestions with some improvements
2025-08-06 10:48:03 +02:00
Kumar Shivendu
9c723aa480 Fix snapshot test flakiness (#6440)
* Temporarily run fewer tests in CI to reproduce flakiness

* disable other integration test

* log collection topology if request fails

* Run in CI until failure

* update tests

* Catch failures and log

* improve logging for search result comparison flakiness

* fix test

* Simplify test

* Use scroll instead of search and simplify existing code

* Trigger CI

* new util function

* debug again

* print collection topology on mismatch

* wait for deletion of flag after recovery is done

* use wait_for

* Revert integration-tests.yml
2025-04-29 17:10:44 +02:00
tellet-q
592766d319 A new test check that payload_io_read is withing some limit for a larger amount of segments (#6301)
* Add a test on payload_io_read value
2025-04-03 09:12:29 +02:00
Tim Visée
0f07f45cf5 Unify function for creating shard key, we had it in two places (#6227) 2025-03-21 16:32:52 +01:00
Tim Visée
f50292e5eb Test shard key application in consensus snapshot (#6213)
* Test shard key application in consensus snapshot

* Review suggestions
2025-03-21 11:47:33 +01:00
Jojii
c9a6a96bcb Io measurement cleanup and tests (#5949)
* HW measurement cleanup and more tests

* Fix wrong measurements

* Use new assertion function

* Fix Payload Measurement bug. Fix tests
2025-03-12 09:59:43 +01:00
Jojii
bf47c97257 Measure io writes for vector upsertions (#5944)
* Add counter to vector storage API

* Measuring IO write for dense vectors

* Tests, GPU and sparse

* Measure multi vectors too

* Fix comment
2025-03-10 15:27:06 +01:00
Jojii
1fded093b7 Measure hardware IO for update operations (#5922)
* Measure update operations hardware IO

* Add support for distributed setups

* also measure update_local

* Add consensus tests for HW metrics of update operations

* add test for upserting without waiting

* Disable HW usage reporting when not waiting for update API

* Review remarks

* Fix resharding collecting hw measurements

* Fix metric type

* New struct HardwareData for better accumulation

* Ensure we always apply CPU multiplier

* Apply suggestions from code review

* Update src/actix/api/update_api.rs

Co-authored-by: Tim Visée <tim+github@visee.me>

* Fix assert_with_upper_bound_error threshold calculation.

* Clarifying why we don't measure shard cleanup

---------

Co-authored-by: Tim Visée <tim+github@visee.me>
2025-03-06 15:03:23 +01:00
Jojii
9f2a6b0340 [Strict Mode] distributed max collection payload size (#5679)
* Restrict payload size in distributed setup

* Also check overwrite payload API
2024-12-20 17:08:17 +01:00
Jojii
97da5a2942 [Strict Mode] Max collection size in distributed setup (#5592)
* Strict Mode: distributed checking of max collection size

* add size projections in distributed mode

* Add consensus tests

* New Test: All nodes in cluster

* fix tests

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

Co-authored-by: Arnaud Gourlay <arnaud.gourlay@gmail.com>

* increase upsert delay

* add TODO for resharding

* wait for strict mode config to be applied on second node

* remove delays

* Also wait for strict mode in other test

* clearify strict mode config option

---------

Co-authored-by: Arnaud Gourlay <arnaud.gourlay@gmail.com>
2024-12-19 16:38:30 +01:00
Andrey Vasnetsov
724c7a7eac segment inspector + small fixes (#5576)
* segment inspector + small fixes

* clippy
2024-12-03 16:18:56 +01: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
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
Luis Cossío
82511e65fa RBAC: [tests] exhaustive access tests (#3961)
* create exhaustive access test (missing body stubs)

* use json body in rest requests

* use better stubs

* green test for create_shard_key

* make it work for delete_shard_key

* make it work for list_collections

* make it work for get_collection

* make it work for create_collection

* make it work for update_collection_params

* make it work for delete_collection

* make it work for update_aliases

* make it work for create_index

* make it work for collection_exists

* make it work for delete_index

* make it work for get_collection_cluster_info

* don't build grpcio and use `uv` for faster deps installation

* partially prepare for update cluster ops

* make it work for list_collection_aliases

* make it work for list_aliases

* make it work for list_collection_snapshots

* make it work for create_collection_snapshot

* huge refactor + make it work for delete_collection_snapshot

* make it work for download_collection_snapshot

* test_upload_collection_snapshot

* test_recover_collection_snapshot

* test_recover_collection_snapshot

* test_upload_shard_snapshot

* test_recover_shard_snapshot

* test_list_shard_snapshots

* test_create_shard_snapshot

* test_delete_shard_snapshot

* test_download_shard_snapshot

* test_list_snapshots and test_create_snapshot

* test_delete_snapshot

* test_download_full_snapshot

* test_get_cluster

* test_recover_raft_state

* test_delete_peer

* prepare for splitting into another PR

* skip api exhaustiveness checks

* lil cleanup

* fix integration tests workflow

* test search api

* test recommend api

* test discover api

* test count and scroll

* test get and upsert points

* test update points batch

* test update and delete vectors

* test set, overwrite, delete, and clear payload

* test service level actions

* finish testing (with errors), introduce not needing success

* make tests much faster

* simplify delete tests

* complete collection cluster operations

* cleanup

* update after rebase

* change permissions for create and delete shard keys

* review fixes

* add newline
2024-04-11 12:42:59 -04:00
Luis Cossío
8a01c7e13c RBAC: stateful validation with value_exists (#3874) 2024-03-21 13:52:32 -03:00
Tim Visée
e343e575d3 Attempt to improve WAL delta reliability: more throttling (#3790)
* Allow batching in point upsertion fixture

* Increase throttle interval, tweak barrier waiting for transfer progress
2024-03-15 10:07:19 +01:00
Andrey Vasnetsov
98aa44552b make test_collection_creation_after_dropping faster and fix sparse ve… (#3259)
* make test_collection_creation_after_dropping faster and fix sparse vector error

* fix fixture
2023-12-21 20:21:50 +00:00
Arnaud Gourlay
8e709895ef Sparse vectors sanity consensus checks (#3127) 2023-12-03 19:19:39 +01:00
Di Zhao
8c79041552 Add update_concurrency option to control the parallelism of shard updates (#2599)
* add update_concurrency to control the parallelism of updating shards

* reformat the files

* reformat

* add update_concurrency control to shard updates

* use unwrap_or

* test using buffer_ordered

* use buffered (testing)

* Pre-allocate space for update futures

* use NonZeroUsize

* linter

* use NonZeroUsize in the test

* consensus test for update_concurrency

* update config commit

---------

Co-authored-by: Di Zhao <diz@twitter.com>
Co-authored-by: timvisee <tim@visee.me>
Co-authored-by: generall <andrey@vasnetsov.com>
2023-09-12 20:21:19 +02:00
Arnaud Gourlay
77fe829b40 Coalesce cluster operation to fix dropped callback (#2003) 2023-05-31 19:42:21 +02:00
Roman Titov
5d3f9e167e Improve handling of out-of-disk-space errors during Qdrant startup (#1755)
Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2023-04-24 13:02:29 +02:00
Arnaud Gourlay
1be333b8df Increase timeout for rejoin cluster test (#1600) 2023-03-27 10:28:56 +02:00
Andrey Vasnetsov
5849adca91 add listener shard state (#1482)
* add listener shard state

* add to config

* add test
2023-02-23 14:11:59 +01:00
Arnaud Gourlay
ad9558d208 Enable ordering of update requests on replica leader (#1410)
* Enable ordering of update requests on replica leader

* add time for replication
2023-01-31 15:06:56 +01:00
Andrey Vasnetsov
926a058c73 Fixing missed leader inconsistency (#1286)
* WIP: introduce local state

* WIP: sync local state with consensus in idle

* fmt

* rm extensive debug

* update triple replication test

* update triple replication test

* rm debug logs

* fix check for established leader + only sync local if no proposals

* remove unused file

* test compatible with python 3.8

* test compatible with python 3.8

* longer wait for consensus

* longer wait for consensus

* extra sleep in test

* remove extra sleep

* Fixing missed leader inconsistency - transfers (#1298)

* explicit request timeout

* explicit request timeout

* explicit request timeout

* explicit request timeout

* explicit request timeout

* prevent double handelling of the transfer termination

* kill the process

* log on inconsistency

* log on inconsistency

* log on inconsistency

* debug

* revert debug in test

* forward updates to partial shards, abort transactions on dead node report

* fmt

* disable retry of transfer, if the transfer was cancelled + allow predictable ports in test

* fix import
2022-12-23 00:45:04 +01:00
Andrey Vasnetsov
38444d2cc7 Fix consensus freezes (#1241)
* do not await for replica deactivation if there is a logical error

* use async mutex in raft service + integration test for deadlock

* fmt
2022-11-24 15:36:03 +01:00
Andrey Vasnetsov
772326f848 Recover distributed collection (#1214)
* WIP: shards recovering API: download snapshot

* fmt

* snapshot recovery API

* fmt

* snapshot recovery integration test + fixes

* review fixes

* review fixes 2

* Update lib/storage/src/content_manager/snapshots/recover.rs

Co-authored-by: Arnaud Gourlay <arnaud.gourlay@gmail.com>

Co-authored-by: Arnaud Gourlay <arnaud.gourlay@gmail.com>
2022-11-16 10:55:23 +01:00