Commit Graph

15 Commits

Author SHA1 Message Date
Andrey Vasnetsov
81e7ab72fe introduce update_mode parameter for upsert operation to control if we want to insert, update, or upsert (#7963)
* introduce update_mode parameter for upsert operation to control if we want to insert, update, or upsert

* add test

* upd dockstring

* require resharding once all peers have updated version

* use service error

* fix clippy again

* wait for same version before resharding in tests
2026-01-27 00:39:25 +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
Tim Visée
3787cf1f38 Resharding: add test for abort resharding fix (#5795)
* Add consensus test to abort resharding with replicas, previously failed

* Remove unnecessary info fetch

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

---------

Co-authored-by: Roman Titov <ffuugoo@users.noreply.github.com>
2025-01-14 15:15:49 +01:00
Tim Visée
3304d7b60d Resharding: wait on clean up deletes, exact counting in tests (#5787)
* During resharding tests, assert exact counts

* Wait on delete operation while cleaning up points
2025-01-13 19:13:07 +01:00
Roman Titov
ea25a5c45e Add resharding integration tests (#5069)
Co-authored-by: Tim Visée <tim+github@visee.me>
2025-01-07 14:58:34 +01:00
Roman Titov
184f28be93 Disable resharding driver, disable resharding intergration tests, remove some TODOs (#4811) 2024-08-04 13:48:41 +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
Tim Visée
afa581c0ea Double timeout in resharding with concurrent updates test one more time (#4725) 2024-07-22 19:38:13 +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
Tim Visée
ffef206da9 Do 10x more upsertions during resharding test (#4642) 2024-07-10 10:40:46 +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