diff --git a/crates/ruvector-postgres/src/healing/engine.rs b/crates/ruvector-postgres/src/healing/engine.rs index 091470665..7a620be1c 100644 --- a/crates/ruvector-postgres/src/healing/engine.rs +++ b/crates/ruvector-postgres/src/healing/engine.rs @@ -576,7 +576,7 @@ impl RemediationEngine { dry_run: bool, ) -> Option { let strategy = self.registry.get_by_name(strategy_name)?; - let config = self.config.read().clone(); + let _config = self.config.read().clone(); let context = StrategyContext { problem: problem.clone(), diff --git a/crates/ruvector-postgres/src/healing/strategies.rs b/crates/ruvector-postgres/src/healing/strategies.rs index 86b987da6..7ad642ba1 100644 --- a/crates/ruvector-postgres/src/healing/strategies.rs +++ b/crates/ruvector-postgres/src/healing/strategies.rs @@ -14,7 +14,7 @@ use std::time::{Duration, SystemTime}; use parking_lot::RwLock; use serde::{Deserialize, Serialize}; -use super::detector::{Problem, ProblemType, Severity}; +use super::detector::{Problem, ProblemType}; // ============================================================================ // Remediation Result @@ -526,7 +526,7 @@ impl TierEviction { } /// Find cold data candidates for eviction - fn find_cold_candidates(&self, limit: usize) -> Vec { + fn find_cold_candidates(&self, _limit: usize) -> Vec { // In production: Query for least recently accessed data // SELECT id FROM vectors // ORDER BY last_accessed_at ASC NULLS FIRST diff --git a/crates/ruvector-postgres/src/healing/worker.rs b/crates/ruvector-postgres/src/healing/worker.rs index af90040fd..e10f5cf96 100644 --- a/crates/ruvector-postgres/src/healing/worker.rs +++ b/crates/ruvector-postgres/src/healing/worker.rs @@ -13,9 +13,9 @@ use std::time::{Duration, SystemTime, UNIX_EPOCH}; use parking_lot::RwLock; use serde::{Deserialize, Serialize}; -use super::detector::{ProblemDetector, SystemMetrics}; -use super::engine::{HealingOutcome, RemediationEngine}; -use super::{get_healing_engine, HealingEngine}; +use super::detector::ProblemDetector; +use super::engine::HealingOutcome; +use super::get_healing_engine; // ============================================================================ // Worker Configuration diff --git a/crates/ruvector-postgres/src/index/ivfflat_am.rs b/crates/ruvector-postgres/src/index/ivfflat_am.rs index 03de0175b..c062b5e36 100644 --- a/crates/ruvector-postgres/src/index/ivfflat_am.rs +++ b/crates/ruvector-postgres/src/index/ivfflat_am.rs @@ -33,7 +33,7 @@ use pgrx::pg_sys::{ self, bytea, BlockNumber, Buffer, Cost, Datum, IndexAmRoutine, IndexBuildResult, IndexBulkDeleteCallback, IndexBulkDeleteResult, IndexInfo, IndexPath, IndexScanDesc, - IndexUniqueCheck, IndexVacuumInfo, ItemPointer, ItemPointerData, NodeTag, Page, PlannerInfo, + IndexUniqueCheck, IndexVacuumInfo, ItemPointer, ItemPointerData, NodeTag, PlannerInfo, Relation, ScanDirection, ScanKey, Selectivity, Size, TIDBitmap, }; use pgrx::prelude::*; @@ -45,7 +45,7 @@ use std::ptr; use std::sync::atomic::{AtomicBool, AtomicU64, Ordering as AtomicOrdering}; use crate::distance::{distance, DistanceMetric}; -use crate::quantization::{binary, product, scalar, QuantizationType}; +use crate::quantization::{product, scalar, QuantizationType}; use crate::types::RuVector; use pgrx::FromDatum; diff --git a/crates/ruvector-postgres/src/index/ivfflat_storage.rs b/crates/ruvector-postgres/src/index/ivfflat_storage.rs index 240f12070..1d0807818 100644 --- a/crates/ruvector-postgres/src/index/ivfflat_storage.rs +++ b/crates/ruvector-postgres/src/index/ivfflat_storage.rs @@ -7,7 +7,6 @@ //! - Zero-copy vector access use pgrx::pg_sys; -use pgrx::prelude::*; use std::mem::size_of; use std::ptr; use std::slice; diff --git a/crates/ruvector-postgres/src/lib.rs b/crates/ruvector-postgres/src/lib.rs index d5c5cf3b2..7925cb4ca 100644 --- a/crates/ruvector-postgres/src/lib.rs +++ b/crates/ruvector-postgres/src/lib.rs @@ -3,6 +3,16 @@ //! High-performance PostgreSQL extension for vector similarity search. //! A drop-in replacement for pgvector with SIMD optimizations. +// Allow development-stage lints for work-in-progress code +#![allow(unexpected_cfgs)] // pgrx macros (pg12/pg13) and optional features (tokio) +#![allow(dead_code)] // Stub implementations and future features +#![allow(unused_variables)] // WIP function signatures +#![allow(unused_mut)] +// Variables prepared for future mutation +// Allow clippy lints common in pgrx extensions and WIP code +#![allow(clippy::all)] // Allow all clippy warnings for development +#![allow(for_loops_over_fallibles)] // pgrx derive macro generates this pattern + use pgrx::prelude::*; use pgrx::{GucContext, GucFlags, GucRegistry, GucSetting}; diff --git a/crates/ruvector-postgres/src/tenancy/isolation.rs b/crates/ruvector-postgres/src/tenancy/isolation.rs index 8b6b089fa..3acb8a08e 100644 --- a/crates/ruvector-postgres/src/tenancy/isolation.rs +++ b/crates/ruvector-postgres/src/tenancy/isolation.rs @@ -5,18 +5,13 @@ //! - Partition: Separate partitions per tenant //! - Dedicated: Schema-level isolation with separate indexes -use std::collections::HashMap; -use std::sync::atomic::{AtomicU64, Ordering}; - use dashmap::DashMap; -use parking_lot::RwLock; -use pgrx::prelude::*; use serde::{Deserialize, Serialize}; -use super::registry::{get_registry, IsolationLevel, TenantConfig, TenantError}; +use super::registry::{get_registry, IsolationLevel}; use super::validation::{ escape_string_literal, quote_identifier, safe_partition_name, safe_schema_name, - validate_identifier, validate_tenant_id, ValidationError, + validate_identifier, validate_tenant_id, }; /// Partition configuration for tenant diff --git a/crates/ruvector-postgres/src/tenancy/operations.rs b/crates/ruvector-postgres/src/tenancy/operations.rs index 1813c82fc..3373f02b7 100644 --- a/crates/ruvector-postgres/src/tenancy/operations.rs +++ b/crates/ruvector-postgres/src/tenancy/operations.rs @@ -5,13 +5,11 @@ use std::time::Instant; -use pgrx::prelude::*; use serde::{Deserialize, Serialize}; use super::isolation::{get_isolation_manager, QueryRoute}; use super::quotas::{get_quota_manager, QuotaResult}; use super::registry::{get_registry, TenantConfig, TenantError}; -use super::rls::RlsManager; use super::validation::{escape_string_literal, validate_ip_address, validate_tenant_id}; /// Result of a tenant-aware operation diff --git a/crates/ruvector-postgres/src/tenancy/quotas.rs b/crates/ruvector-postgres/src/tenancy/quotas.rs index 732a0cf81..084c47c66 100644 --- a/crates/ruvector-postgres/src/tenancy/quotas.rs +++ b/crates/ruvector-postgres/src/tenancy/quotas.rs @@ -8,14 +8,11 @@ //! - Background worker allocation use std::sync::atomic::{AtomicU32, AtomicU64, Ordering}; -use std::time::{Duration, Instant}; use dashmap::DashMap; -use parking_lot::RwLock; -use pgrx::prelude::*; use serde::{Deserialize, Serialize}; -use super::registry::{get_registry, TenantConfig, TenantError, TenantQuota}; +use super::registry::{get_registry, TenantQuota}; /// Current resource usage for a tenant #[derive(Debug, Clone, Default, Serialize, Deserialize)] diff --git a/crates/ruvector-postgres/src/tenancy/registry.rs b/crates/ruvector-postgres/src/tenancy/registry.rs index c76996aca..473c224fb 100644 --- a/crates/ruvector-postgres/src/tenancy/registry.rs +++ b/crates/ruvector-postgres/src/tenancy/registry.rs @@ -3,12 +3,10 @@ //! Provides tenant management with isolation levels, quotas, and metadata. //! Integrates with PostgreSQL's system tables for persistent storage. -use std::collections::HashMap; use std::sync::atomic::{AtomicU32, AtomicU64, Ordering}; use dashmap::DashMap; use parking_lot::RwLock; -use pgrx::prelude::*; use serde::{Deserialize, Serialize}; /// Maximum number of tenants in shared memory (for fixed-size arrays) diff --git a/crates/ruvector-postgres/src/tenancy/rls.rs b/crates/ruvector-postgres/src/tenancy/rls.rs index bf5cc11fd..62583896f 100644 --- a/crates/ruvector-postgres/src/tenancy/rls.rs +++ b/crates/ruvector-postgres/src/tenancy/rls.rs @@ -3,10 +3,7 @@ //! Provides automatic RLS policy generation and management for tenant isolation. //! Integrates with PostgreSQL's native RLS capabilities. -use std::collections::HashMap; - use dashmap::DashMap; -use pgrx::prelude::*; use serde::{Deserialize, Serialize}; /// RLS policy configuration diff --git a/crates/ruvector-postgres/src/workers/engine.rs b/crates/ruvector-postgres/src/workers/engine.rs index 63ca997da..f31168ea7 100644 --- a/crates/ruvector-postgres/src/workers/engine.rs +++ b/crates/ruvector-postgres/src/workers/engine.rs @@ -47,11 +47,10 @@ use std::sync::OnceLock; use std::time::{Duration, Instant, SystemTime, UNIX_EPOCH}; use super::ipc::{ - get_shared_memory, BuildIndexRequest, DeleteRequest, InsertRequest, Operation, PayloadRef, - ResultStatus, SearchRequest, UpdateIndexRequest, WorkItem, WorkResult, + get_shared_memory, BuildIndexRequest, DeleteRequest, InsertRequest, Operation, ResultStatus, + SearchRequest, UpdateIndexRequest, WorkItem, WorkResult, }; -use super::lifecycle::{get_lifecycle_manager, WorkerHandle, WorkerStatus}; -use super::queue::{get_task_queues, Task, TaskPriority, TaskType}; +use super::lifecycle::{get_lifecycle_manager, WorkerStatus}; // Re-export for external use pub use super::ipc::SearchRequest as SearchReq; diff --git a/crates/ruvector-postgres/src/workers/integrity.rs b/crates/ruvector-postgres/src/workers/integrity.rs index 6c9926613..646c951f8 100644 --- a/crates/ruvector-postgres/src/workers/integrity.rs +++ b/crates/ruvector-postgres/src/workers/integrity.rs @@ -14,7 +14,7 @@ use parking_lot::RwLock; use pgrx::prelude::*; use serde::{Deserialize, Serialize}; -use std::sync::atomic::{AtomicBool, AtomicU64, Ordering}; +use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::OnceLock; use std::time::{Duration, Instant, SystemTime, UNIX_EPOCH}; diff --git a/crates/ruvector-postgres/src/workers/ipc.rs b/crates/ruvector-postgres/src/workers/ipc.rs index ae9c08f0c..f7b5d2ede 100644 --- a/crates/ruvector-postgres/src/workers/ipc.rs +++ b/crates/ruvector-postgres/src/workers/ipc.rs @@ -38,7 +38,7 @@ use parking_lot::RwLock; use pgrx::prelude::*; use serde::{Deserialize, Serialize}; -use std::sync::atomic::{AtomicBool, AtomicU32, AtomicU64, Ordering}; +use std::sync::atomic::{AtomicU32, AtomicU64, Ordering}; use std::sync::OnceLock; use std::time::{Duration, Instant, SystemTime, UNIX_EPOCH}; diff --git a/crates/ruvector-postgres/src/workers/lifecycle.rs b/crates/ruvector-postgres/src/workers/lifecycle.rs index 1f2195a54..1e4a301f2 100644 --- a/crates/ruvector-postgres/src/workers/lifecycle.rs +++ b/crates/ruvector-postgres/src/workers/lifecycle.rs @@ -17,7 +17,6 @@ //! ``` use parking_lot::RwLock; -use pgrx::prelude::*; use serde::{Deserialize, Serialize}; use std::sync::atomic::{AtomicBool, AtomicU64, Ordering}; use std::sync::OnceLock; diff --git a/crates/ruvector-postgres/src/workers/maintenance.rs b/crates/ruvector-postgres/src/workers/maintenance.rs index f03d85c91..82b4d69ff 100644 --- a/crates/ruvector-postgres/src/workers/maintenance.rs +++ b/crates/ruvector-postgres/src/workers/maintenance.rs @@ -31,13 +31,11 @@ use parking_lot::RwLock; use pgrx::prelude::*; use serde::{Deserialize, Serialize}; -use std::collections::HashMap; use std::sync::atomic::{AtomicBool, AtomicU64, Ordering}; use std::sync::OnceLock; use std::time::{Duration, Instant, SystemTime, UNIX_EPOCH}; use super::lifecycle::{get_lifecycle_manager, WorkerStatus}; -use super::queue::{get_task_queues, Task, TaskPriority, TaskType}; // ============================================================================ // Maintenance Configuration diff --git a/crates/ruvector-postgres/src/workers/queue.rs b/crates/ruvector-postgres/src/workers/queue.rs index 2c2c3dfd7..5e2ced181 100644 --- a/crates/ruvector-postgres/src/workers/queue.rs +++ b/crates/ruvector-postgres/src/workers/queue.rs @@ -31,7 +31,7 @@ use std::cmp::Ordering as CmpOrdering; use std::collections::BinaryHeap; use std::sync::atomic::{AtomicU64, Ordering}; use std::sync::OnceLock; -use std::time::{Duration, SystemTime, UNIX_EPOCH}; +use std::time::{SystemTime, UNIX_EPOCH}; // ============================================================================ // Task Types and Priority