mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-18 18:46:17 +00:00
add env RUSTFS_ERASURE_SET_DRIVE_COUNT
This commit is contained in:
@@ -21,8 +21,6 @@ use crate::error::{Error, Result};
|
||||
use crate::disk::BUCKET_META_PREFIX;
|
||||
use crate::store::ECStore;
|
||||
|
||||
type TypeConfigFile = &'static str;
|
||||
|
||||
pub const BUCKET_METADATA_FILE: &str = ".metadata.bin";
|
||||
pub const BUCKET_METADATA_FORMAT: u16 = 1;
|
||||
pub const BUCKET_METADATA_VERSION: u16 = 1;
|
||||
@@ -318,7 +316,7 @@ async fn read_bucket_metadata(api: &ECStore, bucket: &str) -> Result<BucketMetad
|
||||
Ok(bm)
|
||||
}
|
||||
|
||||
fn _deserialize_from_str<'de, S, D>(deserializer: D) -> core::result::Result<S, D::Error>
|
||||
fn _deserialize_from_str<'de, S, D>(_deserializer: D) -> core::result::Result<S, D::Error>
|
||||
where
|
||||
S: FromStr,
|
||||
S::Err: Display,
|
||||
|
||||
@@ -14,7 +14,7 @@ use futures::future::join_all;
|
||||
use lazy_static::lazy_static;
|
||||
use time::OffsetDateTime;
|
||||
use tokio::sync::RwLock;
|
||||
use tracing::{error, info, warn};
|
||||
use tracing::{error, warn};
|
||||
|
||||
use super::metadata::{load_bucket_metadata, BucketMetadata};
|
||||
use super::tags;
|
||||
@@ -118,10 +118,6 @@ impl BucketMetadataSys {
|
||||
}
|
||||
}
|
||||
|
||||
async fn refresh_buckets_metadata_loop(&self, failed_buckets: &HashSet<String>) -> Result<()> {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
pub async fn get(&self, bucket: &str) -> Result<BucketMetadata> {
|
||||
if is_meta_bucketname(bucket) {
|
||||
return Err(Error::new(ConfigError::NotFound));
|
||||
@@ -142,10 +138,10 @@ impl BucketMetadataSys {
|
||||
}
|
||||
}
|
||||
|
||||
async fn reset(&mut self) {
|
||||
let mut map = self.metadata_map.write().await;
|
||||
map.clear();
|
||||
}
|
||||
// async fn reset(&mut self) {
|
||||
// let mut map = self.metadata_map.write().await;
|
||||
// map.clear();
|
||||
// }
|
||||
|
||||
pub async fn update(&mut self, bucket: &str, config_file: &str, data: Vec<u8>) -> Result<OffsetDateTime> {
|
||||
self.update_and_parse(bucket, config_file, data, true).await
|
||||
|
||||
@@ -10,9 +10,9 @@ pub enum ResourceARNType {
|
||||
ResourceARNKMS,
|
||||
}
|
||||
|
||||
// 定义资源ARN前缀
|
||||
const RESOURCE_ARN_PREFIX: &str = "arn:aws:s3:::";
|
||||
const RESOURCE_ARN_KMS_PREFIX: &str = "arn:rustfs:kms::::";
|
||||
// // 定义资源ARN前缀
|
||||
// const RESOURCE_ARN_PREFIX: &str = "arn:aws:s3:::";
|
||||
// const RESOURCE_ARN_KMS_PREFIX: &str = "arn:rustfs:kms::::";
|
||||
|
||||
// 定义Resource结构体
|
||||
#[derive(Debug, Deserialize, Serialize, Default, PartialEq, Eq, Hash, Clone)]
|
||||
|
||||
Reference in New Issue
Block a user