repo
stringlengths
6
65
file_url
stringlengths
81
311
file_path
stringlengths
6
227
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:31:58
2026-01-04 20:25:31
truncated
bool
2 classes
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/src/actix/actix_telemetry.rs
src/actix/actix_telemetry.rs
use std::future::{Ready, ready}; use std::sync::Arc; use actix_web::Error; use actix_web::dev::{Service, ServiceRequest, ServiceResponse, Transform}; use futures_util::future::LocalBoxFuture; use parking_lot::Mutex; use crate::common::telemetry_ops::requests_telemetry::{ ActixTelemetryCollector, ActixWorkerTeleme...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/src/actix/api/count_api.rs
src/actix/api/count_api.rs
use actix_web::{Responder, post, web}; use actix_web_validator::{Json, Path, Query}; use collection::operations::shard_selector_internal::ShardSelectorInternal; use collection::operations::types::CountRequest; use storage::content_manager::collection_verification::check_strict_mode; use storage::dispatcher::Dispatcher;...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/src/actix/api/cluster_api.rs
src/actix/api/cluster_api.rs
use std::future::Future; use actix_web::{HttpResponse, delete, get, post, put, web}; use actix_web_validator::Query; use collection::operations::verification::new_unchecked_verification_pass; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; use storage::content_manager::consensus_ops::ConsensusOperations...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/src/actix/api/facet_api.rs
src/actix/api/facet_api.rs
use actix_web::{Responder, post, web}; use actix_web_validator::{Json, Path, Query}; use api::rest::{FacetRequest, FacetResponse}; use collection::operations::shard_selector_internal::ShardSelectorInternal; use storage::content_manager::collection_verification::check_strict_mode; use storage::dispatcher::Dispatcher; us...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/src/actix/api/debug_api.rs
src/actix/api/debug_api.rs
use actix_web::{Responder, get, patch, web}; use storage::rbac::AccessRequirements; use crate::actix::auth::ActixAccess; use crate::common::debugger::{DebugConfigPatch, DebuggerState}; #[get("/debugger")] async fn get_debugger_config( ActixAccess(access): ActixAccess, debugger_state: web::Data<DebuggerState>,...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/src/actix/api/read_params.rs
src/actix/api/read_params.rs
use std::num::NonZeroU64; use std::time::Duration; use collection::operations::consistency_params::ReadConsistency; use schemars::JsonSchema; use serde::Deserialize; use validator::Validate; #[derive(Copy, Clone, Debug, Default, Eq, PartialEq, Deserialize, JsonSchema, Validate)] pub struct ReadParams { #[serde(de...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/src/actix/api/retrieve_api.rs
src/actix/api/retrieve_api.rs
use std::time::Duration; use actix_web::{Responder, get, post, web}; use actix_web_validator::{Json, Path, Query}; use collection::operations::consistency_params::ReadConsistency; use collection::operations::shard_selector_internal::ShardSelectorInternal; use collection::operations::types::{PointRequest, PointRequestI...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/src/actix/api/snapshot_api.rs
src/actix/api/snapshot_api.rs
use std::path::Path; use ::common::tempfile_ext::MaybeTempPath; use actix_multipart::form::MultipartForm; use actix_multipart::form::tempfile::TempFile; use actix_web::{Responder, Result, delete, get, post, put, web}; use collection::common::file_utils::move_file; use collection::common::sha_256; use collection::commo...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/src/actix/api/profiler_api.rs
src/actix/api/profiler_api.rs
use actix_web::{Responder, get, web}; use actix_web_validator::Query; use collection::profiling::interface::get_requests_profile_log; use collection::profiling::slow_requests_log::LogEntry; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; use storage::rbac::AccessRequirements; use validator::Validate; us...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/src/actix/api/service_api.rs
src/actix/api/service_api.rs
use std::future::Future; use std::sync::Arc; use std::time::Duration; use actix_web::http::StatusCode; use actix_web::http::header::ContentType; use actix_web::rt::time::Instant; use actix_web::web::Data; use actix_web::{HttpResponse, Responder, get, post, web}; use actix_web_validator::Query; use common::types::{Deta...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/src/actix/api/search_api.rs
src/actix/api/search_api.rs
use actix_web::{HttpResponse, Responder, post, web}; use actix_web_validator::{Json, Path, Query}; use api::rest::{SearchMatrixOffsetsResponse, SearchMatrixPairsResponse, SearchMatrixRequest}; use collection::collection::distance_matrix::CollectionSearchMatrixRequest; use collection::operations::shard_selector_internal...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/src/actix/api/query_api.rs
src/actix/api/query_api.rs
use actix_web::{Responder, post, web}; use actix_web_validator::{Json, Path, Query}; use api::rest::models::InferenceUsage; use api::rest::{QueryGroupsRequest, QueryRequest, QueryRequestBatch, QueryResponse}; use collection::operations::shard_selector_internal::ShardSelectorInternal; use itertools::Itertools; use stora...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/src/actix/api/update_api.rs
src/actix/api/update_api.rs
use actix_web::rt::time::Instant; use actix_web::{Responder, delete, post, put, web}; use actix_web_validator::{Json, Path, Query}; use api::rest::UpdateVectors; use api::rest::schema::PointInsertOperations; use collection::operations::payload_ops::{DeletePayload, SetPayload}; use collection::operations::point_ops::Poi...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/src/actix/api/mod.rs
src/actix/api/mod.rs
use common::validation::{validate_collection_name, validate_collection_name_legacy}; use serde::Deserialize; use validator::Validate; pub mod cluster_api; pub mod collections_api; pub mod count_api; pub mod debug_api; pub mod discovery_api; pub mod facet_api; pub mod issues_api; pub mod local_shard_api; pub mod profil...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/src/actix/api/collections_api.rs
src/actix/api/collections_api.rs
use std::time::Duration; use actix_web::rt::time::Instant; use actix_web::{HttpResponse, Responder, delete, get, patch, post, put, web}; use actix_web_validator::{Json, Path, Query}; use collection::operations::cluster_ops::ClusterOperations; use collection::operations::verification::new_unchecked_verification_pass; u...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/src/actix/api/issues_api.rs
src/actix/api/issues_api.rs
use actix_web::{Responder, delete, get, web}; use collection::operations::types::IssuesReport; use storage::rbac::{Access, AccessRequirements}; use crate::actix::auth::ActixAccess; #[get("/issues")] async fn get_issues(ActixAccess(access): ActixAccess) -> impl Responder { crate::actix::helpers::time(async move { ...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/src/actix/api/discovery_api.rs
src/actix/api/discovery_api.rs
use actix_web::{Responder, post, web}; use actix_web_validator::{Json, Path, Query}; use collection::operations::shard_selector_internal::ShardSelectorInternal; use collection::operations::types::{DiscoverRequest, DiscoverRequestBatch}; use itertools::Itertools; use storage::content_manager::collection_verification::{ ...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/src/actix/api/shards_api.rs
src/actix/api/shards_api.rs
use actix_web::{Responder, get, post, put, web}; use actix_web_validator::{Json, Path, Query}; use collection::operations::cluster_ops::{ ClusterOperations, CreateShardingKey, CreateShardingKeyOperation, DropShardingKey, DropShardingKeyOperation, }; use collection::operations::verification::new_unchecked_verifi...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/src/actix/api/local_shard_api.rs
src/actix/api/local_shard_api.rs
use std::num::NonZeroU64; use std::sync::Arc; use std::time::Duration; use actix_web::{Responder, post, web}; use collection::operations::shard_selector_internal::ShardSelectorInternal; use collection::operations::types::{ CountRequestInternal, PointRequestInternal, ScrollRequestInternal, }; use collection::operat...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/src/actix/api/recommend_api.rs
src/actix/api/recommend_api.rs
use std::time::Duration; use actix_web::{Responder, post, web}; use actix_web_validator::{Json, Path, Query}; use collection::operations::consistency_params::ReadConsistency; use collection::operations::shard_selector_internal::ShardSelectorInternal; use collection::operations::types::{ RecommendGroupsRequest, Rec...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/storage/src/lib.rs
lib/storage/src/lib.rs
//! Storage - is a crate which contains all service functions, abstracted from the external interface //! //! It provides all functions, which could be used from REST (or any other interface), but do not //! implement any concrete interface. use content_manager::collection_meta_ops::CollectionMetaOperations; use conte...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/storage/src/dispatcher.rs
lib/storage/src/dispatcher.rs
use std::collections::HashMap; use std::sync::Arc; use std::time::{Duration, Instant}; use api::rest::models::HardwareUsage; use collection::common::fetch_vectors::CollectionName; use collection::config::ShardingMethod; use collection::operations::verification::VerificationPass; use collection::shards::replica_set::re...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/storage/src/types.rs
lib/storage/src/types.rs
use std::collections::HashMap; use std::num::NonZeroUsize; use std::time::Duration; use chrono::{DateTime, Utc}; use collection::common::snapshots_manager::SnapshotsConfig; use collection::config::{WalConfig, default_on_disk_payload}; use collection::operations::config_diff::OptimizersConfigDiff; use collection::opera...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/storage/src/issues_subscribers.rs
lib/storage/src/issues_subscribers.rs
use std::sync::Arc; use collection::events::{CollectionDeletedEvent, IndexCreatedEvent, SlowQueryEvent}; use collection::problems::UnindexedField; use issues::Code; use issues::broker::Subscriber; #[derive(Clone, Copy)] pub struct UnindexedFieldSubscriber; impl Subscriber<SlowQueryEvent> for UnindexedFieldSubscriber...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/storage/src/content_manager/errors.rs
lib/storage/src/content_manager/errors.rs
use std::backtrace::Backtrace; use std::io::Error as IoError; use std::time::Duration; use collection::operations::types::CollectionError; use collection::shards::shard::ShardId; use io::file_operations::FileStorageError; use tempfile::PersistError; use thiserror::Error; pub type StorageResult<T> = Result<T, StorageE...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/storage/src/content_manager/shard_distribution.rs
lib/storage/src/content_manager/shard_distribution.rs
use std::cmp::{self, Reverse}; use std::collections::BinaryHeap; use std::iter::repeat_with; use std::num::NonZeroU32; use collection::shards::collection_shard_distribution::CollectionShardDistribution; use collection::shards::shard::{PeerId, ShardId}; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; #[...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/storage/src/content_manager/collections_ops.rs
lib/storage/src/content_manager/collections_ops.rs
use std::collections::HashMap; use collection::collection::Collection; use collection::shards::CollectionId; use crate::content_manager::errors::StorageError; pub type Collections = HashMap<CollectionId, Collection>; pub trait Checker { fn collection_exists(&self, collection_name: &str) -> bool; fn validat...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/storage/src/content_manager/mod.rs
lib/storage/src/content_manager/mod.rs
use collection::shards::shard::PeerId; use self::collection_meta_ops::CollectionMetaOperations; use self::consensus_manager::CollectionsSnapshot; use self::errors::StorageError; pub mod alias_mapping; pub mod collection_meta_ops; pub mod collection_verification; mod collections_ops; pub mod consensus; pub mod consens...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/storage/src/content_manager/staging.rs
lib/storage/src/content_manager/staging.rs
//! Staging-only operations for testing and debugging purposes. //! //! This module contains operations that are only available when the `staging` feature is enabled. use collection::shards::shard::PeerId; use serde::{Deserialize, Serialize}; /// Introduce artificial delay to a specific peer node. /// If no peer prov...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/storage/src/content_manager/collection_verification.rs
lib/storage/src/content_manager/collection_verification.rs
use std::iter; use std::sync::Arc; use collection::operations::verification::{ StrictModeVerification, VerificationPass, check_timeout, new_unchecked_verification_pass, }; use super::errors::StorageError; use super::toc::TableOfContent; use crate::dispatcher::Dispatcher; use crate::rbac::{Access, AccessRequiremen...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/storage/src/content_manager/conversions.rs
lib/storage/src/content_manager/conversions.rs
use std::collections::HashMap; use std::str::FromStr; use api::conversions::json; use collection::operations::config_diff::{ CollectionParamsDiff, HnswConfigDiff, OptimizersConfigDiff, QuantizationConfigDiff, }; use collection::operations::conversions::sharding_method_from_proto; use collection::operations::types:...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/storage/src/content_manager/alias_mapping.rs
lib/storage/src/content_manager/alias_mapping.rs
use std::collections::HashMap; use std::path::{Path, PathBuf}; use collection::shards::CollectionId; use fs_err as fs; use io::file_operations::{atomic_save_json, read_json}; use serde::{Deserialize, Serialize}; use crate::content_manager::errors::StorageError; pub const ALIAS_MAPPING_CONFIG_FILE: &str = "data.json"...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/storage/src/content_manager/collection_meta_ops.rs
lib/storage/src/content_manager/collection_meta_ops.rs
use std::collections::BTreeMap; use collection::config::{CollectionConfigInternal, CollectionParams, ShardingMethod}; use collection::operations::config_diff::{ CollectionParamsDiff, HnswConfigDiff, OptimizersConfigDiff, QuantizationConfigDiff, WalConfigDiff, }; use collection::operations::types::{ SparseV...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/storage/src/content_manager/consensus_manager.rs
lib/storage/src/content_manager/consensus_manager.rs
use std::collections::{HashMap, HashSet}; use std::error::Error; use std::fmt::Display; use std::future::Future; use std::ops::Deref; use std::path::Path; use std::str; use std::sync::Arc; use std::time::{Duration, Instant}; use anyhow::{Context, anyhow}; use chrono::Utc; use collection::collection_state; use collecti...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
true
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/storage/src/content_manager/toc/transfer.rs
lib/storage/src/content_manager/toc/transfer.rs
use async_trait::async_trait; use collection::operations::types::{CollectionError, CollectionResult}; use collection::shards::CollectionId; use collection::shards::replica_set::replica_set_state::ReplicaState; use collection::shards::resharding::ReshardKey; use collection::shards::shard::{PeerId, ShardId}; use collecti...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/storage/src/content_manager/toc/telemetry.rs
lib/storage/src/content_manager/toc/telemetry.rs
use std::sync::Arc; use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering}; use std::time::Duration; use collection::operations::types::CollectionResult; use collection::telemetry::{ CollectionSnapshotTelemetry, CollectionTelemetry, CollectionsAggregatedTelemetry, }; use common::scope_tracker::{ScopeTracker, S...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/storage/src/content_manager/toc/dispatcher.rs
lib/storage/src/content_manager/toc/dispatcher.rs
use std::sync::Weak; use super::TableOfContent; use crate::content_manager::consensus_manager::ConsensusStateRef; #[derive(Clone)] pub struct TocDispatcher { /// Reference to table of contents /// /// This dispatcher is stored inside the table of contents after construction. It therefore /// uses a we...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/storage/src/content_manager/toc/collection_container.rs
lib/storage/src/content_manager/toc/collection_container.rs
use std::collections::HashMap; use std::sync::Arc; use collection::collection::Collection; use collection::collection_state; use collection::shards::CollectionId; use collection::shards::collection_shard_distribution::CollectionShardDistribution; use collection::shards::replica_set::replica_set_state::ReplicaState; us...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/storage/src/content_manager/toc/request_hw_counter.rs
lib/storage/src/content_manager/toc/request_hw_counter.rs
use common::counter::hardware_accumulator::{HwMeasurementAcc, HwSharedDrain}; use super::TableOfContent; impl TableOfContent { pub fn get_collection_hw_metrics(&self, collection_id: String) -> HwSharedDrain { self.collection_hw_metrics .entry(collection_id) .or_default() ...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/storage/src/content_manager/toc/mod.rs
lib/storage/src/content_manager/toc/mod.rs
mod collection_container; mod collection_meta_ops; mod create_collection; pub mod dispatcher; mod point_ops; mod point_ops_internal; pub mod request_hw_counter; mod snapshots; mod telemetry; mod temp_directories; pub mod transfer; use std::cmp::max; use std::collections::{HashMap, HashSet}; use std::num::NonZeroU32; u...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/storage/src/content_manager/toc/snapshots.rs
lib/storage/src/content_manager/toc/snapshots.rs
use std::path::{Path, PathBuf}; use collection::common::snapshots_manager::SnapshotStorageManager; use collection::operations::snapshot_ops::SnapshotDescription; use collection::shards::replica_set::replica_set_state::ReplicaState; use collection::shards::shard::{PeerId, ShardId}; use collection::shards::transfer::{Sh...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/storage/src/content_manager/toc/point_ops.rs
lib/storage/src/content_manager/toc/point_ops.rs
use std::time::Duration; use collection::collection::Collection; use collection::collection::distance_matrix::{ CollectionSearchMatrixRequest, CollectionSearchMatrixResponse, }; use collection::grouping::GroupBy; use collection::grouping::group_by::GroupRequest; use collection::operations::consistency_params::Read...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/storage/src/content_manager/toc/point_ops_internal.rs
lib/storage/src/content_manager/toc/point_ops_internal.rs
//! Methods here are for distributed internal use only. use std::time::Duration; use collection::operations::shard_selector_internal::ShardSelectorInternal; use collection::operations::types::UpdateResult; use collection::operations::universal_query::shard_query::{ShardQueryRequest, ShardQueryResponse}; use collectio...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/storage/src/content_manager/toc/collection_meta_ops.rs
lib/storage/src/content_manager/toc/collection_meta_ops.rs
use std::collections::HashSet; use std::path::Path; use std::sync::LazyLock; use collection::collection_state; use collection::config::ShardingMethod; use collection::events::{CollectionDeletedEvent, IndexCreatedEvent}; use collection::shards::collection_shard_distribution::CollectionShardDistribution; use collection:...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/storage/src/content_manager/toc/create_collection.rs
lib/storage/src/content_manager/toc/create_collection.rs
use std::num::NonZeroU32; use collection::collection::Collection; use collection::config::{self, CollectionConfigInternal, CollectionParams, ShardingMethod}; use collection::operations::config_diff::DiffConfig as _; use collection::operations::types::{CollectionResult, VectorsConfig}; use collection::shards::collectio...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/storage/src/content_manager/toc/temp_directories.rs
lib/storage/src/content_manager/toc/temp_directories.rs
use std::path::{Path, PathBuf}; use collection::operations::types::{CollectionError, CollectionResult}; use fs_err as fs; use crate::content_manager::toc::TableOfContent; const TEMP_SUBDIR_NAME: &str = "tmp"; const FILE_UPLOAD_SUBDIR_NAME: &str = "upload"; /// Functions for managing temporary storages of TOC. /// /...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/storage/src/content_manager/consensus/operation_sender.rs
lib/storage/src/content_manager/consensus/operation_sender.rs
use std::sync::mpsc::Sender; use parking_lot::Mutex; use crate::{ConsensusOperations, StorageError}; /// Structure used to notify consensus about operation pub struct OperationSender(Mutex<Sender<ConsensusOperations>>); impl OperationSender { pub fn new(sender: Sender<ConsensusOperations>) -> Self { Ope...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/storage/src/content_manager/consensus/entry_queue.rs
lib/storage/src/content_manager/consensus/entry_queue.rs
use serde::{Deserialize, Serialize}; pub type EntryId = u64; #[derive(Debug, Clone, Copy, Serialize, Deserialize, Default)] pub struct EntryApplyProgressQueue(Option<(EntryId, EntryId)>); impl EntryApplyProgressQueue { pub fn new(first: EntryId, last: EntryId) -> Self { Self(Some((first, last))) } ...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/storage/src/content_manager/consensus/mod.rs
lib/storage/src/content_manager/consensus/mod.rs
pub mod consensus_wal; pub mod entry_queue; pub mod operation_sender; pub mod persistent;
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/storage/src/content_manager/consensus/consensus_wal.rs
lib/storage/src/content_manager/consensus/consensus_wal.rs
use std::cmp; use std::path::Path; use fs_err as fs; use prost_for_raft::Message; use protobuf::Message as _; use raft::eraftpb::Entry as RaftEntry; use wal::Wal; use crate::StorageError; use crate::content_manager::consensus_manager; use crate::content_manager::consensus_ops::ConsensusOperations; const COLLECTIONS_...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/storage/src/content_manager/consensus/persistent.rs
lib/storage/src/content_manager/consensus/persistent.rs
use std::cmp; use std::collections::HashMap; use std::io::{BufReader, BufWriter, Write}; use std::path::{Path, PathBuf}; use std::sync::Arc; use std::sync::atomic::{AtomicBool, Ordering}; use atomicwrites::{AllowOverwrite, AtomicFile}; use collection::operations::types::PeerMetadata; use collection::shards::shard::Pee...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/storage/src/content_manager/snapshots/download.rs
lib/storage/src/content_manager/snapshots/download.rs
use std::ffi::OsString; use std::path::Path; use common::tempfile_ext::MaybeTempPath; use fs_err::tokio as tokio_fs; use futures::StreamExt; use segment::common::BYTES_IN_MB; use tap::Tap; use tempfile::TempPath; use tokio::io::AsyncWriteExt; use url::Url; use {fs_err as fs, reqwest}; use crate::StorageError; fn sna...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/storage/src/content_manager/snapshots/mod.rs
lib/storage/src/content_manager/snapshots/mod.rs
pub mod download; pub mod recover; use std::collections::HashMap; use std::io::{BufWriter, Write}; use std::path::Path; use collection::operations::snapshot_ops::SnapshotDescription; use collection::operations::verification::new_unchecked_verification_pass; use fs_err as fs; use fs_err::tokio as tokio_fs; use serde::...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/storage/src/content_manager/snapshots/recover.rs
lib/storage/src/content_manager/snapshots/recover.rs
use collection::collection::Collection; use collection::collection::payload_index_schema::{PAYLOAD_INDEX_CONFIG_FILE, PayloadIndexSchema}; use collection::common::sha_256::{hash_file, hashes_equal}; use collection::config::CollectionConfigInternal; use collection::operations::snapshot_ops::{SnapshotPriority, SnapshotRe...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/storage/src/rbac/mod.rs
lib/storage/src/rbac/mod.rs
use std::borrow::Cow; use std::collections::{HashMap, HashSet}; use serde::{Deserialize, Serialize}; use serde_json::Value; use validator::{Validate, ValidateArgs, ValidationError, ValidationErrors}; use crate::content_manager::errors::StorageError; mod ops_checks; /// A structure that defines access rights. #[deri...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/storage/src/rbac/ops_checks.rs
lib/storage/src/rbac/ops_checks.rs
use std::borrow::Cow; use api::rest::{LookupLocation, SearchRequestInternal}; use collection::collection::distance_matrix::CollectionSearchMatrixRequest; use collection::grouping::group_by::{GroupRequest, SourceRequest}; use collection::lookup::WithLookup; use collection::operations::CollectionUpdateOperations; use co...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/storage/tests/integration/alias_tests.rs
lib/storage/tests/integration/alias_tests.rs
use std::num::NonZeroUsize; use std::sync::Arc; use collection::operations::vector_params_builder::VectorParamsBuilder; use collection::operations::verification::new_unchecked_verification_pass; use collection::optimizers_builder::OptimizersConfig; use collection::shards::channel_service::ChannelService; use common::b...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/storage/tests/integration/main.rs
lib/storage/tests/integration/main.rs
mod alias_tests;
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/macros/src/lib.rs
lib/macros/src/lib.rs
use proc_macro::TokenStream; mod anonymize; #[proc_macro_derive(Anonymize, attributes(anonymize))] pub fn derive_anonymize(input: TokenStream) -> TokenStream { match anonymize::derive_anonymize(input.into()) { Ok(ts) => ts.into(), Err(e) => e.to_compile_error().into(), } }
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/macros/src/anonymize.rs
lib/macros/src/anonymize.rs
use std::borrow::Cow; use proc_macro2::TokenStream; use quote::{ToTokens as _, format_ident, quote}; use syn::parse::{Parse, ParseStream}; use syn::spanned::Spanned as _; use syn::{Attribute, Data, DeriveInput, Error, Expr, Index, LitBool, Path, Result, Token, parse2}; mod kw { syn::custom_keyword!(value); sy...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/quantization/build.rs
lib/quantization/build.rs
use std::env; fn main() { println!("cargo:rerun-if-changed=cpp"); let mut builder = cc::Build::new(); let target_arch = env::var("CARGO_CFG_TARGET_ARCH") .expect("CARGO_CFG_TARGET_ARCH env-var is not defined or is not UTF-8"); // TODO: Is `CARGO_CFG_TARGET_FEATURE` *always* defined? // ...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/quantization/src/encoded_storage.rs
lib/quantization/src/encoded_storage.rs
#[cfg(feature = "testing")] use std::io::{Read, Write}; #[cfg(feature = "testing")] use std::num::NonZeroUsize; #[cfg(feature = "testing")] use std::path::Path; use std::path::PathBuf; use common::counter::hardware_counter::HardwareCounterCell; use common::types::PointOffsetType; #[cfg(feature = "testing")] use fs_err...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/quantization/src/p_square.rs
lib/quantization/src/p_square.rs
use ordered_float::NotNan; use crate::EncodingError; /// Extended version of P-square one-quantile estimator by Jain & Chlamtac (1985). /// /// <https://www.cse.wustl.edu/~jain/papers/ftp/psqr.pdf> /// By default, P-square uses 5 markers to estimate a single quantile. /// This implementation is extended to support an...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/quantization/src/kmeans.rs
lib/quantization/src/kmeans.rs
use std::sync::atomic::{AtomicBool, Ordering}; use rand::Rng; use rayon::ThreadPool; use rayon::prelude::*; use crate::EncodingError; pub fn kmeans( data: &[f32], centroids_count: usize, dim: usize, max_iterations: usize, max_threads: usize, accuracy: f32, stopped: &AtomicBool, ) -> Resul...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/quantization/src/encoded_vectors_pq.rs
lib/quantization/src/encoded_vectors_pq.rs
use std::alloc::Layout; #[cfg(all(target_arch = "aarch64", target_feature = "neon"))] use std::arch::aarch64::*; #[cfg(target_arch = "x86_64")] use std::arch::x86_64::*; use std::iter::repeat_with; use std::ops::Range; use std::path::{Path, PathBuf}; use std::sync::Arc; use std::sync::atomic::{AtomicBool, Ordering}; u...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/quantization/src/lib.rs
lib/quantization/src/lib.rs
pub mod encoded_storage; pub mod encoded_vectors; pub mod encoded_vectors_binary; pub mod encoded_vectors_pq; pub mod encoded_vectors_u8; pub mod kmeans; pub mod p_square; pub mod quantile; pub mod vector_stats; use std::fmt::Display; use std::sync::{Arc, Condvar, Mutex}; pub use encoded_storage::{EncodedStorage, Enc...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/quantization/src/quantile.rs
lib/quantization/src/quantile.rs
use permutation_iterator::Permutor; pub const QUANTILE_SAMPLE_SIZE: usize = 100_000; pub(crate) fn find_min_max_from_iter<'a>( iter: impl Iterator<Item = impl AsRef<[f32]> + 'a> + Clone, ) -> (f32, f32) { iter.fold((f32::MAX, f32::MIN), |(mut min, mut max), vector| { for &value in vector.as_ref() { ...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/quantization/src/encoded_vectors.rs
lib/quantization/src/encoded_vectors.rs
use std::path::PathBuf; use common::counter::hardware_counter::HardwareCounterCell; use common::typelevel::TBool; use common::types::PointOffsetType; use memory::mmap_type::MmapFlusher; use serde::{Deserialize, Serialize}; use crate::EncodingError; #[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq)]...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/quantization/src/encoded_vectors_u8.rs
lib/quantization/src/encoded_vectors_u8.rs
use std::alloc::Layout; use std::path::{Path, PathBuf}; use std::sync::atomic::{AtomicBool, Ordering}; use common::counter::hardware_counter::HardwareCounterCell; use common::typelevel::True; use common::types::PointOffsetType; use fs_err as fs; use io::file_operations::atomic_save_json; use memory::mmap_type::MmapFlu...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/quantization/src/vector_stats.rs
lib/quantization/src/vector_stats.rs
use serde::{Deserialize, Serialize}; use crate::VectorParameters; #[derive(Debug, Clone, Serialize, Deserialize)] pub struct VectorStats { pub elements_stats: Vec<VectorElementStats>, } #[derive(Debug, Clone, Serialize, Deserialize)] pub struct VectorElementStats { pub min: f32, pub max: f32, pub mea...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/quantization/src/encoded_vectors_binary.rs
lib/quantization/src/encoded_vectors_binary.rs
use std::alloc::Layout; use std::marker::PhantomData; use std::path::{Path, PathBuf}; use std::sync::atomic::{AtomicBool, Ordering}; use common::counter::hardware_counter::HardwareCounterCell; use common::typelevel::True; use common::types::PointOffsetType; use fs_err as fs; use io::file_operations::atomic_save_json; ...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
true
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/quantization/tests/integration/test_simple.rs
lib/quantization/tests/integration/test_simple.rs
#[cfg(test)] mod tests { use std::sync::atomic::AtomicBool; use common::counter::hardware_counter::HardwareCounterCell; use quantization::encoded_storage::{TestEncodedStorage, TestEncodedStorageBuilder}; use quantization::encoded_vectors::{DistanceType, EncodedVectors, VectorParameters}; use quanti...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/quantization/tests/integration/test_binary_encodings.rs
lib/quantization/tests/integration/test_binary_encodings.rs
#[cfg(test)] mod tests { use std::sync::atomic::AtomicBool; use common::counter::hardware_counter::HardwareCounterCell; use quantization::encoded_storage::{TestEncodedStorage, TestEncodedStorageBuilder}; use quantization::encoded_vectors::{DistanceType, EncodedVectors, VectorParameters}; use quanti...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/quantization/tests/integration/test_binary.rs
lib/quantization/tests/integration/test_binary.rs
#[cfg(test)] mod tests { use std::sync::atomic::AtomicBool; use common::counter::hardware_counter::HardwareCounterCell; use quantization::encoded_storage::{TestEncodedStorage, TestEncodedStorageBuilder}; use quantization::encoded_vectors::{DistanceType, EncodedVectors, VectorParameters}; use quanti...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/quantization/tests/integration/test_avx2.rs
lib/quantization/tests/integration/test_avx2.rs
#[cfg(test)] #[cfg(target_arch = "x86_64")] mod tests { use std::sync::atomic::AtomicBool; use quantization::encoded_storage::{TestEncodedStorage, TestEncodedStorageBuilder}; use quantization::encoded_vectors::{DistanceType, EncodedVectors, VectorParameters}; use quantization::encoded_vectors_u8::{Enco...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/quantization/tests/integration/stop_condition.rs
lib/quantization/tests/integration/stop_condition.rs
#[cfg(test)] mod tests { use std::sync::Arc; use std::sync::atomic::{AtomicBool, Ordering}; use quantization::encoded_storage::{TestEncodedStorage, TestEncodedStorageBuilder}; use quantization::encoded_vectors::{DistanceType, VectorParameters}; use quantization::encoded_vectors_u8::{EncodedVectorsU...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/quantization/tests/integration/test_pq.rs
lib/quantization/tests/integration/test_pq.rs
#[cfg(test)] mod tests { use std::sync::atomic::{AtomicBool, AtomicUsize}; use std::time::Duration; use common::counter::hardware_counter::HardwareCounterCell; use quantization::encoded_storage::{TestEncodedStorage, TestEncodedStorageBuilder}; use quantization::encoded_vectors::{DistanceType, Encod...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/quantization/tests/integration/main.rs
lib/quantization/tests/integration/main.rs
#[cfg(test)] pub mod empty_storage; #[cfg(test)] pub mod metrics; #[cfg(test)] pub mod stop_condition; #[cfg(test)] pub mod test_avx2; #[cfg(test)] pub mod test_binary; #[cfg(test)] pub mod test_binary_encodings; #[cfg(test)] pub mod test_neon; #[cfg(test)] pub mod test_pq; #[cfg(test)] pub mod test_simple; #[cfg(test)...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/quantization/tests/integration/metrics.rs
lib/quantization/tests/integration/metrics.rs
pub fn dot_similarity(v1: &[f32], v2: &[f32]) -> f32 { v1.iter().zip(v2).map(|(a, b)| a * b).sum() } pub fn l2_similarity(v1: &[f32], v2: &[f32]) -> f32 { v1.iter().zip(v2).map(|(a, b)| (a - b).powi(2)).sum() } pub fn l1_similarity(v1: &[f32], v2: &[f32]) -> f32 { v1.iter().zip(v2).map(|(a, b)| (a - b).ab...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/quantization/tests/integration/empty_storage.rs
lib/quantization/tests/integration/empty_storage.rs
#[cfg(test)] mod tests { use std::sync::atomic::AtomicBool; use quantization::EncodedVectorsPQ; use quantization::encoded_storage::{TestEncodedStorage, TestEncodedStorageBuilder}; use quantization::encoded_vectors::{DistanceType, VectorParameters}; use quantization::encoded_vectors_binary::{Encoded...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/quantization/tests/integration/test_neon.rs
lib/quantization/tests/integration/test_neon.rs
#[cfg(test)] #[cfg(all(target_arch = "aarch64", target_feature = "neon"))] mod tests { use std::sync::atomic::AtomicBool; use quantization::encoded_storage::{TestEncodedStorage, TestEncodedStorageBuilder}; use quantization::encoded_vectors::{DistanceType, EncodedVectors, VectorParameters}; use quantiza...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/quantization/tests/integration/test_sse.rs
lib/quantization/tests/integration/test_sse.rs
#[cfg(test)] #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] mod tests { use std::sync::atomic::AtomicBool; use quantization::encoded_storage::{TestEncodedStorage, TestEncodedStorageBuilder}; use quantization::encoded_vectors::{DistanceType, EncodedVectors, VectorParameters}; use quantization:...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/quantization/benches/p_square.rs
lib/quantization/benches/p_square.rs
use std::hint::black_box; use criterion::{Criterion, criterion_group, criterion_main}; use quantization::p_square::P2Quantile; fn p_square(c: &mut Criterion) { let mut group = c.benchmark_group("p_square"); let count = 10_000; let data = (0..count) .map(|_| rand::random::<f64>()) .collect...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/quantization/benches/encode.rs
lib/quantization/benches/encode.rs
use std::sync::atomic::AtomicBool; use criterion::{Criterion, criterion_group, criterion_main}; use permutation_iterator::Permutor; use quantization::encoded_storage::{TestEncodedStorage, TestEncodedStorageBuilder}; use quantization::encoded_vectors::{DistanceType, EncodedVectors, VectorParameters}; use quantization::...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/quantization/benches/pq.rs
lib/quantization/benches/pq.rs
use std::sync::atomic::AtomicBool; use common::counter::hardware_counter::HardwareCounterCell; use criterion::{Criterion, criterion_group, criterion_main}; use quantization::encoded_storage::{TestEncodedStorage, TestEncodedStorageBuilder}; use quantization::encoded_vectors::{DistanceType, EncodedVectors, VectorParamet...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/quantization/benches/binary.rs
lib/quantization/benches/binary.rs
use std::hint::black_box; use std::sync::atomic::AtomicBool; use common::counter::hardware_counter::HardwareCounterCell; use criterion::{Criterion, criterion_group, criterion_main}; use permutation_iterator::Permutor; use quantization::encoded_storage::{TestEncodedStorage, TestEncodedStorageBuilder}; use quantization:...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/gpu/src/debug_messenger.rs
lib/gpu/src/debug_messenger.rs
use std::ffi::CStr; use std::os::raw::c_void; use ash::vk; /// Trait for debug messenger. /// Debug messenger is used to handle Vulkan debug messages. /// If presented, vulkan instance will be created with validation layers and debug messenger. /// Validation layer has a large performance cost, so it should be used o...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/gpu/src/lib.rs
lib/gpu/src/lib.rs
#![cfg(feature = "gpu")] pub mod allocation_callbacks; pub use allocation_callbacks::*; pub mod context; pub use context::*; pub mod debug_messenger; pub use debug_messenger::*; pub mod descriptor_set; pub use descriptor_set::*; pub mod descriptor_set_layout; pub use descriptor_set_layout::*; pub mod buffer; pub ...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/gpu/src/device.rs
lib/gpu/src/device.rs
use std::ffi::CString; use std::sync::Arc; use ash::vk; use gpu_allocator::vulkan::{Allocation, AllocationCreateDesc, Allocator, AllocatorCreateDesc}; use parking_lot::Mutex; use crate::*; /// GPU device structure. /// It's a wrapper around Vulkan device. pub struct Device { /// Instance that owns the device. ...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/gpu/src/descriptor_set_layout.rs
lib/gpu/src/descriptor_set_layout.rs
use std::sync::Arc; use ash::vk; use crate::*; /// `DescriptorSetLayout` defines the linkage to the shader. /// It describes which resources are defined in the shader and how they must be binded. /// This structure does not need shader directly, it defines only linking rules. /// It can be reused between different p...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/gpu/src/allocation_callbacks.rs
lib/gpu/src/allocation_callbacks.rs
use ash::vk; /// AllocationCallbacks is a trait that provides access to Vulkan allocation callbacks. /// It's used to provide custom memory allocation and deallocation functions on CPU side. /// GPU memory allocation is managed by the `gpu-allocator` crate. /// Even though Vulkan provides default allocation callbacks,...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/gpu/src/pipeline.rs
lib/gpu/src/pipeline.rs
use std::collections::HashMap; use std::sync::Arc; use ash::vk; use crate::*; static SHADER_ENTRY_POINT: &std::ffi::CStr = c"main"; /// Pipeline is an abstraction over a Vulkan compute pipeline. /// Pipeline is a GPU resource that defines how a shader should be executed on the GPU. /// For compute pipelines it's a ...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/gpu/src/basic_test.rs
lib/gpu/src/basic_test.rs
static SHADER_CODE: &str = " #version 450 layout(set = 0, binding = 0) buffer Numbers { float data[]; } numbers; layout(set = 0, binding = 1) uniform Param { float param; } param; void main() { uint index = gl_GlobalInvocationID.x; numbers.data[index] += param.param; } "; // Basic GPU test. // It ta...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/gpu/src/buffer.rs
lib/gpu/src/buffer.rs
use std::ops::Range; use std::sync::Arc; use ash::vk; use gpu_allocator::MemoryLocation; use gpu_allocator::vulkan::{Allocation, AllocationCreateDesc, AllocationScheme}; use parking_lot::{MappedMutexGuard, Mutex, MutexGuard}; use zerocopy::{FromBytes, Immutable, IntoBytes}; use crate::*; static DOWNLOAD_NOT_ALLOWED_...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/gpu/src/context.rs
lib/gpu/src/context.rs
use std::sync::Arc; use ash::vk; use crate::*; /// Timeout to wait for GPU execution in drop function. static DROP_TIMEOUT: std::time::Duration = std::time::Duration::from_secs(30 * 60); /// GPU execution context. /// It records commands and run them on GPU. /// It keeps track of resources used in the commands. ///...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/gpu/src/shader.rs
lib/gpu/src/shader.rs
use std::sync::Arc; use ash::vk; use crate::*; /// Struct that represents a compiled shader. /// If you want to create a new shader, you have to compile it first using `shaderc`. pub struct Shader { /// Device that owns the shader. device: Arc<Device>, /// Vulkan shader module handle. vk_shader_modu...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/gpu/src/descriptor_set.rs
lib/gpu/src/descriptor_set.rs
use std::sync::Arc; use ash::vk; use crate::*; /// `DescriptorSet` is a collection of buffers that can be bound to a shader. /// It depends on a DescriptorSetLayout which defines linkage to the shader. /// This structure does not need shader directly, shader will be provided by `Pipeline`. /// It can be reused betwe...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/gpu/src/instance.rs
lib/gpu/src/instance.rs
use std::collections::HashMap; use std::ffi::CString; use std::ops::Deref; use std::sync::Arc; use ash::vk; use parking_lot::Mutex; use crate::*; static APPLICATION_NAME: &std::ffi::CStr = c"qdrant"; /// `Instance` is a Vulkan instance wrapper. /// It's a root structure for all Vulkan operations and provides access...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/posting_list/src/visitor.rs
lib/posting_list/src/visitor.rs
use common::types::PointOffsetType; use crate::iterator::PostingIterator; use crate::value_handler::{PostingValue, ValueHandler}; use crate::view::PostingListView; use crate::{CHUNK_LEN, PostingElement}; /// A visitor for a posting list which caches the latest decompressed chunk of ids. pub struct PostingVisitor<'a, ...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false
qdrant/qdrant
https://github.com/qdrant/qdrant/blob/f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd/lib/posting_list/src/builder.rs
lib/posting_list/src/builder.rs
use std::marker::PhantomData; use bitpacking::BitPacker; use common::types::PointOffsetType; use zerocopy::little_endian::U32; use crate::posting_list::{PostingChunk, PostingElement, PostingList, RemainderPosting}; use crate::value_handler::{PostingValue, ValueHandler}; use crate::{BitPackerImpl, CHUNK_LEN}; pub str...
rust
Apache-2.0
f937d0260ffd7705c6f34d9c25da1e27ebf5ddfd
2026-01-04T15:34:51.524868Z
false