mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-18 18:46:17 +00:00
4559baaeeb
- Remove reed-solomon-erasure dependency and all related code - Simplify ReedSolomonEncoder from enum to struct with SIMD-only implementation - Eliminate all conditional compilation (#[cfg(feature = ...)]) - Add instance caching with RwLock-based encoder/decoder reuse - Implement reset mechanism to avoid unnecessary allocations - Ensure thread safety with proper cache management - Update documentation and benchmark scripts for SIMD-only approach - Apply code formatting across all files Breaking Changes: - Removes support for reed-solomon-erasure feature flag - API remains compatible but implementation is now SIMD-only Performance Impact: - Improved encoding/decoding performance through SIMD optimization - Reduced memory allocations via instance caching - Enhanced thread safety and concurrency support
169 lines
6.6 KiB
Rust
169 lines
6.6 KiB
Rust
/// Bucket copy metric descriptor
|
|
use crate::metrics::{MetricDescriptor, MetricName, new_counter_md, new_gauge_md, subsystems};
|
|
|
|
/// Bucket level replication metric descriptor
|
|
pub const BUCKET_L: &str = "bucket";
|
|
/// Replication operation
|
|
pub const OPERATION_L: &str = "operation";
|
|
/// Replication target ARN
|
|
pub const TARGET_ARN_L: &str = "targetArn";
|
|
/// Replication range
|
|
pub const RANGE_L: &str = "range";
|
|
|
|
lazy_static::lazy_static! {
|
|
pub static ref BUCKET_REPL_LAST_HR_FAILED_BYTES_MD: MetricDescriptor =
|
|
new_gauge_md(
|
|
MetricName::LastHourFailedBytes,
|
|
"Total number of bytes failed at least once to replicate in the last hour on a bucket",
|
|
&[BUCKET_L],
|
|
subsystems::BUCKET_REPLICATION
|
|
);
|
|
|
|
pub static ref BUCKET_REPL_LAST_HR_FAILED_COUNT_MD: MetricDescriptor =
|
|
new_gauge_md(
|
|
MetricName::LastHourFailedCount,
|
|
"Total number of objects which failed replication in the last hour on a bucket",
|
|
&[BUCKET_L],
|
|
subsystems::BUCKET_REPLICATION
|
|
);
|
|
|
|
pub static ref BUCKET_REPL_LAST_MIN_FAILED_BYTES_MD: MetricDescriptor =
|
|
new_gauge_md(
|
|
MetricName::LastMinFailedBytes,
|
|
"Total number of bytes failed at least once to replicate in the last full minute on a bucket",
|
|
&[BUCKET_L],
|
|
subsystems::BUCKET_REPLICATION
|
|
);
|
|
|
|
pub static ref BUCKET_REPL_LAST_MIN_FAILED_COUNT_MD: MetricDescriptor =
|
|
new_gauge_md(
|
|
MetricName::LastMinFailedCount,
|
|
"Total number of objects which failed replication in the last full minute on a bucket",
|
|
&[BUCKET_L],
|
|
subsystems::BUCKET_REPLICATION
|
|
);
|
|
|
|
pub static ref BUCKET_REPL_LATENCY_MS_MD: MetricDescriptor =
|
|
new_gauge_md(
|
|
MetricName::LatencyMilliSec,
|
|
"Replication latency on a bucket in milliseconds",
|
|
&[BUCKET_L, OPERATION_L, RANGE_L, TARGET_ARN_L],
|
|
subsystems::BUCKET_REPLICATION
|
|
);
|
|
|
|
pub static ref BUCKET_REPL_PROXIED_DELETE_TAGGING_REQUESTS_TOTAL_MD: MetricDescriptor =
|
|
new_counter_md(
|
|
MetricName::ProxiedDeleteTaggingRequestsTotal,
|
|
"Number of DELETE tagging requests proxied to replication target",
|
|
&[BUCKET_L],
|
|
subsystems::BUCKET_REPLICATION
|
|
);
|
|
|
|
pub static ref BUCKET_REPL_PROXIED_GET_REQUESTS_FAILURES_MD: MetricDescriptor =
|
|
new_counter_md(
|
|
MetricName::ProxiedGetRequestsFailures,
|
|
"Number of failures in GET requests proxied to replication target",
|
|
&[BUCKET_L],
|
|
subsystems::BUCKET_REPLICATION
|
|
);
|
|
|
|
pub static ref BUCKET_REPL_PROXIED_GET_REQUESTS_TOTAL_MD: MetricDescriptor =
|
|
new_counter_md(
|
|
MetricName::ProxiedGetRequestsTotal,
|
|
"Number of GET requests proxied to replication target",
|
|
&[BUCKET_L],
|
|
subsystems::BUCKET_REPLICATION
|
|
);
|
|
|
|
// TODO - add a metric for the number of PUT requests proxied to replication target
|
|
pub static ref BUCKET_REPL_PROXIED_GET_TAGGING_REQUESTS_FAILURES_MD: MetricDescriptor =
|
|
new_counter_md(
|
|
MetricName::ProxiedGetTaggingRequestFailures,
|
|
"Number of failures in GET tagging requests proxied to replication target",
|
|
&[BUCKET_L],
|
|
subsystems::BUCKET_REPLICATION
|
|
);
|
|
|
|
pub static ref BUCKET_REPL_PROXIED_GET_TAGGING_REQUESTS_TOTAL_MD: MetricDescriptor =
|
|
new_counter_md(
|
|
MetricName::ProxiedGetTaggingRequestsTotal,
|
|
"Number of GET tagging requests proxied to replication target",
|
|
&[BUCKET_L],
|
|
subsystems::BUCKET_REPLICATION
|
|
);
|
|
|
|
pub static ref BUCKET_REPL_PROXIED_HEAD_REQUESTS_FAILURES_MD: MetricDescriptor =
|
|
new_counter_md(
|
|
MetricName::ProxiedHeadRequestsFailures,
|
|
"Number of failures in HEAD requests proxied to replication target",
|
|
&[BUCKET_L],
|
|
subsystems::BUCKET_REPLICATION
|
|
);
|
|
|
|
pub static ref BUCKET_REPL_PROXIED_HEAD_REQUESTS_TOTAL_MD: MetricDescriptor =
|
|
new_counter_md(
|
|
MetricName::ProxiedHeadRequestsTotal,
|
|
"Number of HEAD requests proxied to replication target",
|
|
&[BUCKET_L],
|
|
subsystems::BUCKET_REPLICATION
|
|
);
|
|
|
|
// TODO - add a metric for the number of PUT requests proxied to replication target
|
|
pub static ref BUCKET_REPL_PROXIED_PUT_TAGGING_REQUESTS_FAILURES_MD: MetricDescriptor =
|
|
new_counter_md(
|
|
MetricName::ProxiedPutTaggingRequestFailures,
|
|
"Number of failures in PUT tagging requests proxied to replication target",
|
|
&[BUCKET_L],
|
|
subsystems::BUCKET_REPLICATION
|
|
);
|
|
|
|
pub static ref BUCKET_REPL_PROXIED_PUT_TAGGING_REQUESTS_TOTAL_MD: MetricDescriptor =
|
|
new_counter_md(
|
|
MetricName::ProxiedPutTaggingRequestsTotal,
|
|
"Number of PUT tagging requests proxied to replication target",
|
|
&[BUCKET_L],
|
|
subsystems::BUCKET_REPLICATION
|
|
);
|
|
|
|
pub static ref BUCKET_REPL_SENT_BYTES_MD: MetricDescriptor =
|
|
new_counter_md(
|
|
MetricName::SentBytes,
|
|
"Total number of bytes replicated to the target",
|
|
&[BUCKET_L],
|
|
subsystems::BUCKET_REPLICATION
|
|
);
|
|
|
|
pub static ref BUCKET_REPL_SENT_COUNT_MD: MetricDescriptor =
|
|
new_counter_md(
|
|
MetricName::SentCount,
|
|
"Total number of objects replicated to the target",
|
|
&[BUCKET_L],
|
|
subsystems::BUCKET_REPLICATION
|
|
);
|
|
|
|
pub static ref BUCKET_REPL_TOTAL_FAILED_BYTES_MD: MetricDescriptor =
|
|
new_counter_md(
|
|
MetricName::TotalFailedBytes,
|
|
"Total number of bytes failed at least once to replicate since server start",
|
|
&[BUCKET_L],
|
|
subsystems::BUCKET_REPLICATION
|
|
);
|
|
|
|
pub static ref BUCKET_REPL_TOTAL_FAILED_COUNT_MD: MetricDescriptor =
|
|
new_counter_md(
|
|
MetricName::TotalFailedCount,
|
|
"Total number of objects which failed replication since server start",
|
|
&[BUCKET_L],
|
|
subsystems::BUCKET_REPLICATION
|
|
);
|
|
|
|
// TODO - add a metric for the number of DELETE requests proxied to replication target
|
|
pub static ref BUCKET_REPL_PROXIED_DELETE_TAGGING_REQUESTS_FAILURES_MD: MetricDescriptor =
|
|
new_counter_md(
|
|
MetricName::ProxiedDeleteTaggingRequestFailures,
|
|
"Number of failures in DELETE tagging requests proxied to replication target",
|
|
&[BUCKET_L],
|
|
subsystems::BUCKET_REPLICATION
|
|
);
|
|
}
|