* move problems.rs to collection crate
* change type on datetime_key expression
* extract from expression
* check for unindexed fields in formula
* clippy
* dedup code
* Only implement verification for `CollectionQuery` types (#6319)
* verify CollectionQuery's Prefetch
* remove implementation for REST query
* remove implementation for REST query groups
* add basic openapi test
* Add in rest and grpc
* add to QueryEnum
* implement Query trait
* connect to scorer creation
* upd tests
* additional changes
* fmt
* gen openapi and grpc docs
* coderabbit fix
* add changes in async scorer
* test sum_scores in more places, refactor to remove repetition
* Add magic all flag, if set all features will be enabled
* Report enabled feature flags on start, if any is enabled
* Remove pub visibility from all, add comment it's only applied on init
* Don't check all flag in is_empty
* Simplify `ShardKeyMapping` impl
* Automatically switch to new mappings format, if `Number` shard key is used
* Apply TODOs
* Add comment describing the issue, leave instructions for migration
* Cleanup
Remove unnecessary assignment
* Cleanup
Remove misleading comment
---------
Co-authored-by: timvisee <tim@visee.me>
* Use safe shard key wrapper type in consensus snapshot state
* Add shard ID iterator
* Produce net wrapped shard key mapping type directly
* Add useful comments
* Fix typo
* Add global feature flags structure, load on start
* Feature flag use of new shard key format
* Enable feature flag for new shard key format by default in dev builds
* Prevent unwrapping everywhere; Single place for initialization (#6198)
* Disable shard key feature flag by default for now, it causes problems
---------
Co-authored-by: Jojii <15957865+JojiiOfficial@users.noreply.github.com>
* Cardinality estimation measurements
* Apply hw measurements to latest changes from dev
* Clippy
* Also measure cardinality estimation for geo index
* Make measured units 'bytes'
* Use PointOffsetType instead of u32 for size calculation
* fix memory cost for check_values_any in mmap index
* fix double counting for value reading in mmap, remove hw_counter from mmap hashmap
* fmt
* fix hw measurement for text index
* Remove non necessary lifetime annotations
---------
Co-authored-by: generall <andrey@vasnetsov.com>
* Add payload index filtering IO measurements for some indices
* Add payload index metric to api and telemetry
* Also account for index access overhead
* Review remarks
* Anonymize new HardwareUsage field
* Fix tests
* 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>
* Anonymize ShardKey in ReplicaSetTelemetry
* Anonymize vector names in CollectionConfigInternal
* no-op: impl HardwareUsage for HardwareUsage (used in HardwareTelemetry)
* no-op: impl Anonymize for OptimizersStatus (used in OptimizerTelemetry and CollectionsAggregatedTelemetry)
* no-op: impl Anonymize for TrackerStatus in (used in TrackerTelemetry)
* no-op: Anonymize VectorParams in VectorsConfig
* no-op: Copy fields explicitly in OperationDurationStatistics
* no-op: `.clone().map(|x| x.anonymize())` -> `.anonymize()`
* no-op: impl Anonymize for ConsensusThreadStatus (used in PeerInfo and ClusterStatusTelemetry)
* Bump Rust edition to 2024
* gen is a reserved keyword now
* Remove ref mut on references
* Mark extern C as unsafe
* Wrap unsafe function bodies in unsafe block
* Geo hash implements Copy, don't reference but pass by value instead
* Replace secluded self import with parent
* Update execute_cluster_read_operation with new match semantics
* Fix lifetime issue
* Replace map_or with is_none_or
* set_var is unsafe now
* Reformat
* rename cpu_budget -> resource_budget
* clippy
* add io budget to resources
* fmt
* move budget structures into a separate file
* add extend permit function
* dont extend existing permit
* switch from IO to CPU permit
* do not release resource before aquiring an extension
* fmt
* Review remarks
* Improve resource permit number assertion
* Make resource permit replace_with only acquire extra needed permits
* Remove obsolete drop implementation
* allocate IO budget same as CPU
* review fixes
---------
Co-authored-by: timvisee <tim@visee.me>
* Add `InternalUpdateParams` structure...
...to easier propagate `shard_id` and `clock_tag` internal API parameters
* fixup! Add `InternalUpdateParams` structure...
Use `InternalUpdateParams::default` instead of `Default::default`
* Remove now obsolete delinters, expect them where still applicable
---------
Co-authored-by: timvisee <tim@visee.me>
* Rename `UpdateParam` into `UpdateParams` and remove `Option`s from fields
* Use `common::inference::extract_token` in internal gRPC API
* Destructure `UpdateVectorsInternal`/`DeleteVectorsInternal` requests in internal gRPC API
* Add `extract_internal_request` helper for internal gRPC API
* fixup! Add `extract_internal_request` helper for internal gRPC API
Use `extract_internal_request` helper in `sync` API
* fixup! Rename `UpdateParam` into `UpdateParams` and remove `Option`s from fields
Remove `JsonSchema` derive from `UpdateParams`
* Retry-After on rate limiter hit for REST API
* fix tests
* Ceil retry after seconds number so clients don't retry too early
* Relax retry after time requirement a bit in case CI machines are slow
* Add rate limit test, test retry after if we replanish within a second
* Report time to wait in rate limit error
---------
Co-authored-by: timvisee <tim@visee.me>
* bump and migrate to rand 0.9.0
also bump rand_distr to 0.5.0 to match it
* Migrate AVX2 and SSE implementations
* Remove unused thread_rng placeholders
* More random migrations
* Migrate GPU tests
* bump seed
---------
Co-authored-by: timvisee <tim@visee.me>
Co-authored-by: Arnaud Gourlay <arnaud.gourlay@gmail.com>
* Measure read io for payload storage
* Add Hardware Counter to update functions
* Fix tests and benches
* Rename (some) *_measured functions back to original