This commit is contained in:
weisd
2025-04-08 22:10:47 +08:00
parent 69e27bfece
commit 3dbdd38889
5 changed files with 15 additions and 16 deletions
+1 -1
View File
@@ -380,7 +380,7 @@ impl DataUsageCache {
let mut retries = 0;
while retries < 5 {
let path = Path::new(BUCKET_META_PREFIX).join(name);
warn!("Loading data usage cache from backend: {}", path.display());
// warn!("Loading data usage cache from backend: {}", path.display());
match store
.get_object_reader(
RUSTFS_META_BUCKET,
+2 -2
View File
@@ -25,7 +25,7 @@ use std::io::ErrorKind;
use std::sync::Arc;
use tokio::sync::broadcast::{self, Receiver as B_Receiver};
use tokio::sync::mpsc::{self, Receiver, Sender};
use tracing::{error, warn};
use tracing::error;
use uuid::Uuid;
const MAX_OBJECT_LIST: i32 = 1000;
@@ -248,7 +248,7 @@ impl ECStore {
..Default::default()
};
warn!("list_objects_generic opts {:?}", &opts);
// warn!("list_objects_generic opts {:?}", &opts);
// use get
if !opts.prefix.is_empty() && opts.limit == 1 && opts.marker.is_none() {
+1 -1
View File
@@ -135,7 +135,7 @@ where
}
async fn load(self: Arc<Self>) -> Result<()> {
debug!("load iam to cache");
// debug!("load iam to cache");
self.api.load_all(&self.cache).await?;
self.last_timestamp
.store(OffsetDateTime::now_utc().unix_timestamp(), Ordering::Relaxed);
+1 -1
View File
@@ -133,7 +133,7 @@ impl ObjectStore {
}
async fn list_iam_config_items(&self, prefix: &str, ctx_rx: B_Receiver<bool>, sender: Sender<StringOrErr>) {
debug!("list iam config items, prefix: {}", &prefix);
// debug!("list iam config items, prefix: {}", &prefix);
// todo, 实现walk,使用walk
+10 -11
View File
@@ -8,7 +8,6 @@ use policy::policy::{Args, BucketPolicyArgs};
use s3s::access::{S3Access, S3AccessContext};
use s3s::{dto::*, s3_error, S3Error, S3ErrorCode, S3Request, S3Result};
use std::collections::HashMap;
use tracing::info;
#[allow(dead_code)]
#[derive(Default, Clone)]
@@ -144,16 +143,16 @@ impl S3Access for FS {
// /// + [`cx.extensions_mut()`](S3AccessContext::extensions_mut)
async fn check(&self, cx: &mut S3AccessContext<'_>) -> S3Result<()> {
// 上层验证了 ak/sk
info!(
"s3 check uri: {:?}, method: {:?} path: {:?}, s3_op: {:?}, cred: {:?}, headers:{:?}",
cx.uri(),
cx.method(),
cx.s3_path(),
cx.s3_op().name(),
cx.credentials(),
cx.headers(),
// cx.extensions_mut(),
);
// info!(
// "s3 check uri: {:?}, method: {:?} path: {:?}, s3_op: {:?}, cred: {:?}, headers:{:?}",
// cx.uri(),
// cx.method(),
// cx.s3_path(),
// cx.s3_op().name(),
// cx.credentials(),
// cx.headers(),
// // cx.extensions_mut(),
// );
let (cred, is_owner) = if let Some(input_cred) = cx.credentials() {
let (cred, is_owner) =