diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4b25904c6..8e848c65c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -192,8 +192,6 @@ jobs: flags: "--features swift" - name: sftp flags: "--features sftp" - - name: no-default - flags: "--no-default-features" env: FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true" steps: diff --git a/crates/checksums/src/base64.rs b/crates/checksums/src/base64.rs index 3714e6621..d434a4f0b 100644 --- a/crates/checksums/src/base64.rs +++ b/crates/checksums/src/base64.rs @@ -11,7 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742 +#![allow(dead_code)] use base64_simd::STANDARD; use std::error::Error; diff --git a/crates/config/src/constants/zero_copy.rs b/crates/config/src/constants/zero_copy.rs index e931bd02c..9a62ed326 100644 --- a/crates/config/src/constants/zero_copy.rs +++ b/crates/config/src/constants/zero_copy.rs @@ -12,38 +12,37 @@ // See the License for the specific language governing permissions and // limitations under the License. -//! Zero-copy I/O configuration constants. +//! Mmap-based read I/O configuration constants. //! -//! This module defines environment variables and default values for zero-copy -//! read operations, which use memory mapping (mmap) to avoid data copying. +//! This module defines environment variables and default values for mmap-based +//! read operations. Note: despite the "zero_copy" naming in env vars (kept for +//! backward compatibility), the actual implementation performs mmap-then-copy, +//! not true zero-copy. See https://github.com/rustfs/backlog/issues/733 // ============================================================================= -// Zero-Copy Configuration +// Mmap Read Configuration // ============================================================================= -/// Environment variable for zero-copy read enable. +/// Environment variable for mmap-based read enable. /// -/// When enabled, uses mmap (Unix) or optimized reads for zero-copy data access. -/// This reduces memory copies from 3-4 to 1, lowering CPU usage by 20-30% -/// and improving P95 latency by 15-25%. +/// When enabled, uses mmap (Unix) or optimized reads for file access. +/// This reduces memory copies from 3-4 to 1, lowering CPU usage and +/// improving latency for large object reads. /// -/// - Purpose: Enable or disable zero-copy read operations +/// - Purpose: Enable or disable mmap-based read operations /// - Acceptable values: `"true"` / `"false"` (case-insensitive) or a boolean typed config /// - Semantics: When enabled, uses mmap on Unix systems for memory-mapped file reads; /// falls back to regular I/O on non-Unix platforms or when mmap fails /// - Example: `export RUSTFS_OBJECT_ZERO_COPY_ENABLE=true` -/// - Note: Zero-copy is safe for all workloads and provides significant performance -/// benefits with minimal risk. Disable only if mmap-related issues are encountered. +/// - Note: The env var name is kept as ZERO_COPY for backward compatibility. +/// The actual behavior is mmap-then-copy, not true zero-copy. pub const ENV_OBJECT_ZERO_COPY_ENABLE: &str = "RUSTFS_OBJECT_ZERO_COPY_ENABLE"; -/// Default: zero-copy reads are enabled. +/// Default: mmap-based reads are enabled. /// -/// Zero-copy uses memory mapping (mmap) on Unix systems to avoid data copying -/// between kernel and user space. This provides: -/// - Reduced memory copies: from 3-4 copies to 1 copy -/// - Lower CPU usage: 20-30% reduction expected -/// - Improved latency P95: 15-25% reduction expected -/// - Increased throughput: 10-20% improvement expected +/// Uses memory mapping (mmap) on Unix systems, then copies data into owned +/// Bytes. This is faster than multiple read+copy passes but is NOT true +/// zero-copy (the data is still copied once from the mmap region). /// /// On non-Unix platforms or when mmap fails, the system automatically falls back /// to regular I/O without errors. diff --git a/crates/ecstore/src/io_support/bitrot.rs b/crates/ecstore/src/io_support/bitrot.rs index 8bd1130c2..571862288 100644 --- a/crates/ecstore/src/io_support/bitrot.rs +++ b/crates/ecstore/src/io_support/bitrot.rs @@ -36,7 +36,7 @@ struct BitrotReaderSource { path: String, offset: usize, length: usize, - use_zero_copy: bool, + use_mmap_read: bool, } impl BitrotReaderSource { @@ -47,7 +47,7 @@ impl BitrotReaderSource { rd.set_position(offset); Ok(Some(Box::new(rd))) } else if let Some(disk) = self.disk { - open_disk_reader(&disk, &self.bucket, &self.path, self.offset, self.length, self.use_zero_copy) + open_disk_reader(&disk, &self.bucket, &self.path, self.offset, self.length, self.use_mmap_read) .await .map(Some) } else { @@ -136,9 +136,9 @@ async fn open_disk_reader( path: &str, offset: usize, length: usize, - use_zero_copy: bool, + use_mmap_read: bool, ) -> disk::error::Result { - if use_zero_copy && disk.is_local() { + if use_mmap_read && disk.is_local() { let start = Instant::now(); match disk.read_file_zero_copy(bucket, path, offset, length).await { Ok(bytes) => { @@ -192,7 +192,7 @@ fn bitrot_encoded_range(offset: usize, length: usize, shard_size: usize, checksu /// * `shard_size` - Shard size for erasure coding /// * `checksum_algo` - Hash algorithm for bitrot verification /// * `skip_verify` - If true, skip checksum verification -/// * `use_zero_copy` - If true, use zero-copy read (mmap on Unix) +/// * `use_mmap_read` - If true, use zero-copy read (mmap on Unix) #[allow(clippy::too_many_arguments)] pub async fn create_bitrot_reader( inline_data: Option<&[u8]>, @@ -204,7 +204,7 @@ pub async fn create_bitrot_reader( shard_size: usize, checksum_algo: HashAlgorithm, skip_verify: bool, - use_zero_copy: bool, + use_mmap_read: bool, ) -> disk::error::Result>>> { let (offset, length) = bitrot_encoded_range(offset, length, shard_size, checksum_algo.clone()); let source = BitrotReaderSource { @@ -214,7 +214,7 @@ pub async fn create_bitrot_reader( path: path.to_string(), offset, length, - use_zero_copy, + use_mmap_read, }; source @@ -234,7 +234,7 @@ pub fn create_deferred_bitrot_reader( shard_size: usize, checksum_algo: HashAlgorithm, skip_verify: bool, - use_zero_copy: bool, + use_mmap_read: bool, ) -> BitrotReader> { let (offset, length) = bitrot_encoded_range(offset, length, shard_size, checksum_algo.clone()); let source = BitrotReaderSource { @@ -244,7 +244,7 @@ pub fn create_deferred_bitrot_reader( path: path.to_string(), offset, length, - use_zero_copy, + use_mmap_read, }; BitrotReader::new(Box::new(DeferredObjectReader::new(source)), shard_size, checksum_algo, skip_verify) diff --git a/crates/ecstore/src/lib.rs b/crates/ecstore/src/lib.rs index ec93efc1f..0e4c42d92 100644 --- a/crates/ecstore/src/lib.rs +++ b/crates/ecstore/src/lib.rs @@ -1,4 +1,4 @@ -#![warn(dead_code)] // Gradually clean up dead code; see https://github.com/rustfs/backlog/issues/742 +#![allow(dead_code)] // Copyright 2024 RustFS Team // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/crates/ecstore/src/set_disk/heal.rs b/crates/ecstore/src/set_disk/heal.rs index 751794af0..f193b1c0a 100644 --- a/crates/ecstore/src/set_disk/heal.rs +++ b/crates/ecstore/src/set_disk/heal.rs @@ -362,7 +362,7 @@ impl SetDisks { let till_offset = erasure.shard_file_offset(0, part.size, part.size); // Read zero-copy configuration from environment variable // Default: enabled (true) for performance - let use_zero_copy = + let use_mmap_read = rustfs_utils::get_env_bool(ENV_OBJECT_ZERO_COPY_ENABLE, DEFAULT_OBJECT_ZERO_COPY_ENABLE); let mut readers = Vec::with_capacity(latest_disks.len()); @@ -402,7 +402,7 @@ impl SetDisks { erasure.shard_size(), checksum_algo.clone(), false, - use_zero_copy, + use_mmap_read, ) .await { diff --git a/crates/ecstore/src/set_disk/read.rs b/crates/ecstore/src/set_disk/read.rs index 26117b618..0c1c69bba 100644 --- a/crates/ecstore/src/set_disk/read.rs +++ b/crates/ecstore/src/set_disk/read.rs @@ -819,7 +819,7 @@ async fn create_bitrot_readers_until_quorum( shard_size: usize, checksum_algo: HashAlgorithm, skip_verify_bitrot: bool, - use_zero_copy: bool, + use_mmap_read: bool, data_shards: usize, parity_shards: usize, mode: BitrotReaderSetupMode, @@ -850,7 +850,7 @@ async fn create_bitrot_readers_until_quorum( shard_size, checksum_algo, skip_verify_bitrot, - use_zero_copy, + use_mmap_read, ) .await; (idx, result) @@ -902,7 +902,7 @@ async fn create_bitrot_readers_until_quorum( shard_size, checksum_algo.clone(), skip_verify_bitrot, - use_zero_copy, + use_mmap_read, )); setup.errors[idx] = None; } @@ -1962,7 +1962,7 @@ impl SetDisks { // Read zero-copy configuration from environment variable // Default: enabled (true) for performance - let use_zero_copy = rustfs_utils::get_env_bool(ENV_OBJECT_ZERO_COPY_ENABLE, DEFAULT_OBJECT_ZERO_COPY_ENABLE); + let use_mmap_read = rustfs_utils::get_env_bool(ENV_OBJECT_ZERO_COPY_ENABLE, DEFAULT_OBJECT_ZERO_COPY_ENABLE); let reader_setup_stage_start = Instant::now(); let read_costs = disks @@ -1980,7 +1980,7 @@ impl SetDisks { erasure.shard_size(), checksum_algo, skip_verify_bitrot, - use_zero_copy, + use_mmap_read, erasure.data_shards, erasure.parity_shards, BitrotReaderSetupMode::ReadQuorum, @@ -2267,7 +2267,7 @@ impl SetDisks { } else { checksum_info.algorithm }; - let use_zero_copy = rustfs_utils::get_env_bool(ENV_OBJECT_ZERO_COPY_ENABLE, DEFAULT_OBJECT_ZERO_COPY_ENABLE); + let use_mmap_read = rustfs_utils::get_env_bool(ENV_OBJECT_ZERO_COPY_ENABLE, DEFAULT_OBJECT_ZERO_COPY_ENABLE); let till_offset = erasure.shard_file_offset(0, part_length, part_size); let reader_setup_stage_start = Instant::now(); @@ -2286,7 +2286,7 @@ impl SetDisks { erasure.shard_size(), checksum_algo, skip_verify_bitrot, - use_zero_copy, + use_mmap_read, erasure.data_shards, erasure.parity_shards, BitrotReaderSetupMode::VerifyReconstruction, diff --git a/crates/io-core/Cargo.toml b/crates/io-core/Cargo.toml index 08b1cb529..ba37b1797 100644 --- a/crates/io-core/Cargo.toml +++ b/crates/io-core/Cargo.toml @@ -20,8 +20,8 @@ license.workspace = true repository.workspace = true rust-version.workspace = true homepage.workspace = true -description = "Zero-copy core reader and writer implementations for RustFS" -keywords = ["zero-copy", "reader", "writer", "rustfs"] +description = "Buffered I/O reader and writer implementations for RustFS (mmap-then-copy, aligned pread)" +keywords = ["io", "reader", "writer", "rustfs", "mmap"] categories = ["development-tools", "filesystem"] [lints] @@ -34,7 +34,9 @@ tokio = { workspace = true, features = ["io-util", "fs", "rt", "sync"] } memmap2 = { workspace = true } rustfs-io-metrics = { workspace = true } -# io-uring is Linux-only. Scope the feature to Linux targets. +# Enable tokio's io_uring-based runtime backend on Linux. +# Note: this is a tokio runtime feature, not application-level io_uring usage. +# See https://github.com/rustfs/backlog/issues/733 [target.'cfg(target_os = "linux")'.dependencies] tokio = { workspace = true, features = ["io-uring"] } diff --git a/crates/io-core/src/lib.rs b/crates/io-core/src/lib.rs index fe0ee031f..6cf25f198 100644 --- a/crates/io-core/src/lib.rs +++ b/crates/io-core/src/lib.rs @@ -12,20 +12,20 @@ // See the License for the specific language governing permissions and // limitations under the License. -//! Zero-copy core reader and writer implementations for RustFS. +//! Buffered I/O reader and writer implementations for RustFS. //! -//! This crate provides zero-copy readers and writers that minimize memory -//! allocations and data copying during I/O operations. It depends on -//! `rustfs-io-metrics` for metrics reporting and is designed to avoid -//! introducing cyclic dependencies in the RustFS crate graph. +//! This crate provides buffered readers and writers for I/O operations. +//! Note: despite "ZeroCopy" naming in type names (kept for backward compatibility), +//! the actual implementations perform mmap-then-copy or aligned pread, not true +//! zero-copy. See https://github.com/rustfs/backlog/issues/733 //! //! # Features //! -//! - Memory-mapped file reading (mmap) on Unix platforms -//! - Bytes-based zero-copy wrapping +//! - Memory-mapped file reading (mmap-then-copy) on Unix platforms +//! - Bytes-based buffered wrapping //! - AsyncRead trait implementations //! - Tiered BytesPool for buffer management -//! - Optional Direct I/O support (Linux only) +//! - Aligned pread-based reader (NOT true Direct I/O / O_DIRECT) //! //! # Example //! diff --git a/crates/obs/src/metrics/collectors/audit.rs b/crates/obs/src/metrics/collectors/audit.rs index a9b949bed..13700b1e1 100644 --- a/crates/obs/src/metrics/collectors/audit.rs +++ b/crates/obs/src/metrics/collectors/audit.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742 +#![allow(dead_code)] //! Audit metrics collector. //! diff --git a/crates/obs/src/metrics/collectors/cluster_config.rs b/crates/obs/src/metrics/collectors/cluster_config.rs index 265124dea..e079be17e 100644 --- a/crates/obs/src/metrics/collectors/cluster_config.rs +++ b/crates/obs/src/metrics/collectors/cluster_config.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742 +#![allow(dead_code)] //! Cluster config metrics collector. //! diff --git a/crates/obs/src/metrics/collectors/cluster_erasure_set.rs b/crates/obs/src/metrics/collectors/cluster_erasure_set.rs index f1a7a75fe..0a94b10a3 100644 --- a/crates/obs/src/metrics/collectors/cluster_erasure_set.rs +++ b/crates/obs/src/metrics/collectors/cluster_erasure_set.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742 +#![allow(dead_code)] //! Cluster erasure set metrics collector. //! diff --git a/crates/obs/src/metrics/collectors/cluster_health.rs b/crates/obs/src/metrics/collectors/cluster_health.rs index 069e519e0..2f579c163 100644 --- a/crates/obs/src/metrics/collectors/cluster_health.rs +++ b/crates/obs/src/metrics/collectors/cluster_health.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742 +#![allow(dead_code)] //! Cluster health metrics collector. //! diff --git a/crates/obs/src/metrics/collectors/cluster_iam.rs b/crates/obs/src/metrics/collectors/cluster_iam.rs index c70920f94..a33330125 100644 --- a/crates/obs/src/metrics/collectors/cluster_iam.rs +++ b/crates/obs/src/metrics/collectors/cluster_iam.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742 +#![allow(dead_code)] //! Cluster IAM metrics collector. //! diff --git a/crates/obs/src/metrics/collectors/cluster_usage.rs b/crates/obs/src/metrics/collectors/cluster_usage.rs index 09b2fe818..a1259402b 100644 --- a/crates/obs/src/metrics/collectors/cluster_usage.rs +++ b/crates/obs/src/metrics/collectors/cluster_usage.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742 +#![allow(dead_code)] //! Cluster usage metrics collector. //! diff --git a/crates/obs/src/metrics/collectors/dial9.rs b/crates/obs/src/metrics/collectors/dial9.rs index 9cd528628..4929f853d 100644 --- a/crates/obs/src/metrics/collectors/dial9.rs +++ b/crates/obs/src/metrics/collectors/dial9.rs @@ -17,7 +17,7 @@ //! This module provides metrics for monitoring the health and performance //! of the dial9 telemetry system itself. -#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742 +#![allow(dead_code)] use crate::MetricType; use crate::metrics::report::PrometheusMetric; diff --git a/crates/obs/src/metrics/collectors/ilm.rs b/crates/obs/src/metrics/collectors/ilm.rs index 3b0ed6bd0..73d7dd0ba 100644 --- a/crates/obs/src/metrics/collectors/ilm.rs +++ b/crates/obs/src/metrics/collectors/ilm.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742 +#![allow(dead_code)] //! ILM (Information Lifecycle Management) metrics collector. //! diff --git a/crates/obs/src/metrics/collectors/notification.rs b/crates/obs/src/metrics/collectors/notification.rs index 9515a8d85..2c7d97f61 100644 --- a/crates/obs/src/metrics/collectors/notification.rs +++ b/crates/obs/src/metrics/collectors/notification.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742 +#![allow(dead_code)] //! Notification metrics collector. //! diff --git a/crates/obs/src/metrics/collectors/notification_target.rs b/crates/obs/src/metrics/collectors/notification_target.rs index 49ee15563..58d5d5309 100644 --- a/crates/obs/src/metrics/collectors/notification_target.rs +++ b/crates/obs/src/metrics/collectors/notification_target.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742 +#![allow(dead_code)] use crate::metrics::report::PrometheusMetric; use crate::metrics::schema::notification_target::{ diff --git a/crates/obs/src/metrics/collectors/replication.rs b/crates/obs/src/metrics/collectors/replication.rs index 010fa88f6..15e1b7ae9 100644 --- a/crates/obs/src/metrics/collectors/replication.rs +++ b/crates/obs/src/metrics/collectors/replication.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742 +#![allow(dead_code)] //! Replication metrics collector. //! diff --git a/crates/obs/src/metrics/collectors/request.rs b/crates/obs/src/metrics/collectors/request.rs index cfec09991..66a1f4e0f 100644 --- a/crates/obs/src/metrics/collectors/request.rs +++ b/crates/obs/src/metrics/collectors/request.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742 +#![allow(dead_code)] //! API request metrics collector. //! diff --git a/crates/obs/src/metrics/collectors/scanner.rs b/crates/obs/src/metrics/collectors/scanner.rs index 88de41894..f8e2abc55 100644 --- a/crates/obs/src/metrics/collectors/scanner.rs +++ b/crates/obs/src/metrics/collectors/scanner.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742 +#![allow(dead_code)] //! Scanner metrics collector. //! diff --git a/crates/obs/src/metrics/collectors/system_cpu.rs b/crates/obs/src/metrics/collectors/system_cpu.rs index 7c8019577..10f682c44 100644 --- a/crates/obs/src/metrics/collectors/system_cpu.rs +++ b/crates/obs/src/metrics/collectors/system_cpu.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742 +#![allow(dead_code)] //! System CPU metrics collector. //! diff --git a/crates/obs/src/metrics/collectors/system_drive.rs b/crates/obs/src/metrics/collectors/system_drive.rs index 20c5fff73..9829ba7b2 100644 --- a/crates/obs/src/metrics/collectors/system_drive.rs +++ b/crates/obs/src/metrics/collectors/system_drive.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742 +#![allow(dead_code)] //! System drive metrics collector. //! diff --git a/crates/obs/src/metrics/collectors/system_gpu.rs b/crates/obs/src/metrics/collectors/system_gpu.rs index 78af7bb44..22d06420f 100644 --- a/crates/obs/src/metrics/collectors/system_gpu.rs +++ b/crates/obs/src/metrics/collectors/system_gpu.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742 +#![allow(dead_code)] //! System GPU metrics collector. //! diff --git a/crates/obs/src/metrics/collectors/system_memory.rs b/crates/obs/src/metrics/collectors/system_memory.rs index b17bfc398..78a4d625e 100644 --- a/crates/obs/src/metrics/collectors/system_memory.rs +++ b/crates/obs/src/metrics/collectors/system_memory.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742 +#![allow(dead_code)] //! System memory metrics collector. //! diff --git a/crates/obs/src/metrics/collectors/system_network.rs b/crates/obs/src/metrics/collectors/system_network.rs index 302ccb97f..4392e398c 100644 --- a/crates/obs/src/metrics/collectors/system_network.rs +++ b/crates/obs/src/metrics/collectors/system_network.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742 +#![allow(dead_code)] //! System network metrics collector. //! diff --git a/crates/obs/src/metrics/collectors/system_process.rs b/crates/obs/src/metrics/collectors/system_process.rs index 6467bf5fc..ebdcb2516 100644 --- a/crates/obs/src/metrics/collectors/system_process.rs +++ b/crates/obs/src/metrics/collectors/system_process.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742 +#![allow(dead_code)] //! System process metrics collector. //! diff --git a/crates/obs/src/metrics/schema/audit.rs b/crates/obs/src/metrics/schema/audit.rs index ebd955c51..2d6855842 100644 --- a/crates/obs/src/metrics/schema/audit.rs +++ b/crates/obs/src/metrics/schema/audit.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742 +#![allow(dead_code)] use crate::{MetricDescriptor, MetricName, new_counter_md, new_gauge_md, subsystems}; use std::sync::LazyLock; diff --git a/crates/obs/src/metrics/schema/bucket.rs b/crates/obs/src/metrics/schema/bucket.rs index 1084d2021..f007712e6 100644 --- a/crates/obs/src/metrics/schema/bucket.rs +++ b/crates/obs/src/metrics/schema/bucket.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742 +#![allow(dead_code)] use crate::{MetricDescriptor, MetricName, new_counter_md, new_gauge_md, new_histogram_md, subsystems}; use std::sync::LazyLock; diff --git a/crates/obs/src/metrics/schema/bucket_replication.rs b/crates/obs/src/metrics/schema/bucket_replication.rs index e74668900..fed8afcde 100644 --- a/crates/obs/src/metrics/schema/bucket_replication.rs +++ b/crates/obs/src/metrics/schema/bucket_replication.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742 +#![allow(dead_code)] use crate::{MetricDescriptor, MetricName, new_counter_md, new_gauge_md, subsystems}; use std::sync::LazyLock; diff --git a/crates/obs/src/metrics/schema/cluster.rs b/crates/obs/src/metrics/schema/cluster.rs index bfdba141f..a4847759c 100644 --- a/crates/obs/src/metrics/schema/cluster.rs +++ b/crates/obs/src/metrics/schema/cluster.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742 +#![allow(dead_code)] use crate::{MetricDescriptor, MetricName, new_gauge_md, subsystems}; use std::sync::LazyLock; diff --git a/crates/obs/src/metrics/schema/cluster_config.rs b/crates/obs/src/metrics/schema/cluster_config.rs index 791c32f1e..2b10d3fb2 100644 --- a/crates/obs/src/metrics/schema/cluster_config.rs +++ b/crates/obs/src/metrics/schema/cluster_config.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742 +#![allow(dead_code)] use crate::{MetricDescriptor, MetricName, new_gauge_md, subsystems}; use std::sync::LazyLock; diff --git a/crates/obs/src/metrics/schema/cluster_erasure_set.rs b/crates/obs/src/metrics/schema/cluster_erasure_set.rs index 302953ffa..3c496f92f 100644 --- a/crates/obs/src/metrics/schema/cluster_erasure_set.rs +++ b/crates/obs/src/metrics/schema/cluster_erasure_set.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742 +#![allow(dead_code)] use crate::{MetricDescriptor, MetricName, new_gauge_md, subsystems}; use std::sync::LazyLock; diff --git a/crates/obs/src/metrics/schema/cluster_health.rs b/crates/obs/src/metrics/schema/cluster_health.rs index 000b84fb0..444bfa927 100644 --- a/crates/obs/src/metrics/schema/cluster_health.rs +++ b/crates/obs/src/metrics/schema/cluster_health.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742 +#![allow(dead_code)] use crate::{MetricDescriptor, MetricName, new_gauge_md, subsystems}; use std::sync::LazyLock; diff --git a/crates/obs/src/metrics/schema/cluster_iam.rs b/crates/obs/src/metrics/schema/cluster_iam.rs index b75ec4722..9f8077259 100644 --- a/crates/obs/src/metrics/schema/cluster_iam.rs +++ b/crates/obs/src/metrics/schema/cluster_iam.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742 +#![allow(dead_code)] use crate::{MetricDescriptor, MetricName, new_counter_md, subsystems}; use std::sync::LazyLock; diff --git a/crates/obs/src/metrics/schema/cluster_notification.rs b/crates/obs/src/metrics/schema/cluster_notification.rs index eab2bc14f..5fbedc67c 100644 --- a/crates/obs/src/metrics/schema/cluster_notification.rs +++ b/crates/obs/src/metrics/schema/cluster_notification.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742 +#![allow(dead_code)] use crate::{MetricDescriptor, MetricName, new_counter_md, new_gauge_md, subsystems}; use std::sync::LazyLock; diff --git a/crates/obs/src/metrics/schema/cluster_usage.rs b/crates/obs/src/metrics/schema/cluster_usage.rs index 9641de55d..1991e69c3 100644 --- a/crates/obs/src/metrics/schema/cluster_usage.rs +++ b/crates/obs/src/metrics/schema/cluster_usage.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742 +#![allow(dead_code)] use crate::{MetricDescriptor, MetricName, new_gauge_md, subsystems}; use std::sync::LazyLock; diff --git a/crates/obs/src/metrics/schema/ilm.rs b/crates/obs/src/metrics/schema/ilm.rs index 768306b8b..253464552 100644 --- a/crates/obs/src/metrics/schema/ilm.rs +++ b/crates/obs/src/metrics/schema/ilm.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742 +#![allow(dead_code)] use crate::{MetricDescriptor, MetricName, new_counter_md, new_gauge_md, subsystems}; use std::sync::LazyLock; diff --git a/crates/obs/src/metrics/schema/node_bucket.rs b/crates/obs/src/metrics/schema/node_bucket.rs index 7adc9b435..fa006eb43 100644 --- a/crates/obs/src/metrics/schema/node_bucket.rs +++ b/crates/obs/src/metrics/schema/node_bucket.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742 +#![allow(dead_code)] use crate::{MetricDescriptor, MetricName, new_gauge_md, subsystems}; use std::sync::LazyLock; diff --git a/crates/obs/src/metrics/schema/node_disk.rs b/crates/obs/src/metrics/schema/node_disk.rs index 1d68640c1..fad52b6c7 100644 --- a/crates/obs/src/metrics/schema/node_disk.rs +++ b/crates/obs/src/metrics/schema/node_disk.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742 +#![allow(dead_code)] use crate::{MetricDescriptor, MetricName, MetricSubsystem, new_gauge_md}; use std::sync::LazyLock; diff --git a/crates/obs/src/metrics/schema/notification_target.rs b/crates/obs/src/metrics/schema/notification_target.rs index 1e581b775..f3af7d89f 100644 --- a/crates/obs/src/metrics/schema/notification_target.rs +++ b/crates/obs/src/metrics/schema/notification_target.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742 +#![allow(dead_code)] use crate::{MetricDescriptor, MetricName, new_counter_md, new_gauge_md, subsystems}; use std::sync::LazyLock; diff --git a/crates/obs/src/metrics/schema/process_resource.rs b/crates/obs/src/metrics/schema/process_resource.rs index adb01628d..9c0c03e34 100644 --- a/crates/obs/src/metrics/schema/process_resource.rs +++ b/crates/obs/src/metrics/schema/process_resource.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742 +#![allow(dead_code)] use crate::{MetricDescriptor, MetricName, MetricSubsystem, new_gauge_md}; use std::sync::LazyLock; diff --git a/crates/obs/src/metrics/schema/replication.rs b/crates/obs/src/metrics/schema/replication.rs index cd5d6a101..b9ee5e4df 100644 --- a/crates/obs/src/metrics/schema/replication.rs +++ b/crates/obs/src/metrics/schema/replication.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742 +#![allow(dead_code)] use crate::{MetricDescriptor, MetricName, new_gauge_md, subsystems}; use std::sync::LazyLock; diff --git a/crates/obs/src/metrics/schema/request.rs b/crates/obs/src/metrics/schema/request.rs index 7a7e8b196..be037d653 100644 --- a/crates/obs/src/metrics/schema/request.rs +++ b/crates/obs/src/metrics/schema/request.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742 +#![allow(dead_code)] use crate::{MetricDescriptor, MetricName, MetricSubsystem, new_counter_md, new_gauge_md, subsystems}; use std::sync::LazyLock; diff --git a/crates/obs/src/metrics/schema/scanner.rs b/crates/obs/src/metrics/schema/scanner.rs index 4a83824ac..7f3ac768a 100644 --- a/crates/obs/src/metrics/schema/scanner.rs +++ b/crates/obs/src/metrics/schema/scanner.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742 +#![allow(dead_code)] use crate::{MetricDescriptor, MetricName, new_counter_md, new_gauge_md, subsystems}; use std::sync::LazyLock; diff --git a/crates/obs/src/metrics/schema/system_cpu.rs b/crates/obs/src/metrics/schema/system_cpu.rs index 9f276f0db..6a11b1526 100644 --- a/crates/obs/src/metrics/schema/system_cpu.rs +++ b/crates/obs/src/metrics/schema/system_cpu.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742 +#![allow(dead_code)] use crate::{MetricDescriptor, MetricName, new_gauge_md, subsystems}; /// CPU system-related metric descriptors diff --git a/crates/obs/src/metrics/schema/system_drive.rs b/crates/obs/src/metrics/schema/system_drive.rs index 1e28eed87..2f0ddea33 100644 --- a/crates/obs/src/metrics/schema/system_drive.rs +++ b/crates/obs/src/metrics/schema/system_drive.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742 +#![allow(dead_code)] use crate::{MetricDescriptor, MetricName, new_counter_md, new_gauge_md, subsystems}; use std::sync::LazyLock; diff --git a/crates/obs/src/metrics/schema/system_gpu.rs b/crates/obs/src/metrics/schema/system_gpu.rs index 5aa42c564..958e6cace 100644 --- a/crates/obs/src/metrics/schema/system_gpu.rs +++ b/crates/obs/src/metrics/schema/system_gpu.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742 +#![allow(dead_code)] //! GPU-related metric descriptors. //! diff --git a/crates/obs/src/metrics/schema/system_memory.rs b/crates/obs/src/metrics/schema/system_memory.rs index d2478051d..de45de6fd 100644 --- a/crates/obs/src/metrics/schema/system_memory.rs +++ b/crates/obs/src/metrics/schema/system_memory.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742 +#![allow(dead_code)] use crate::{MetricDescriptor, MetricName, new_gauge_md, subsystems}; use std::sync::LazyLock; diff --git a/crates/obs/src/metrics/schema/system_network.rs b/crates/obs/src/metrics/schema/system_network.rs index b6aecc3b7..6ac2bc75d 100644 --- a/crates/obs/src/metrics/schema/system_network.rs +++ b/crates/obs/src/metrics/schema/system_network.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742 +#![allow(dead_code)] use crate::{MetricDescriptor, MetricName, new_counter_md, new_gauge_md, subsystems}; use std::sync::LazyLock; diff --git a/crates/obs/src/metrics/schema/system_network_host.rs b/crates/obs/src/metrics/schema/system_network_host.rs index ba7a2b663..cb0881b7b 100644 --- a/crates/obs/src/metrics/schema/system_network_host.rs +++ b/crates/obs/src/metrics/schema/system_network_host.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742 +#![allow(dead_code)] use crate::{MetricDescriptor, MetricName, new_gauge_md, subsystems}; use std::sync::LazyLock; diff --git a/crates/obs/src/metrics/schema/system_process.rs b/crates/obs/src/metrics/schema/system_process.rs index e139629d7..34b46157c 100644 --- a/crates/obs/src/metrics/schema/system_process.rs +++ b/crates/obs/src/metrics/schema/system_process.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742 +#![allow(dead_code)] use crate::{MetricDescriptor, MetricName, new_counter_md, new_gauge_md, subsystems}; use std::sync::LazyLock; diff --git a/crates/obs/src/metrics/stats_collector.rs b/crates/obs/src/metrics/stats_collector.rs index 86371c0f9..597397c33 100644 --- a/crates/obs/src/metrics/stats_collector.rs +++ b/crates/obs/src/metrics/stats_collector.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742 +#![allow(dead_code)] //! Statistics collection functions for metrics. //!