fix: improve IAM and quota authorization (#1781)

Signed-off-by: yxrxy <yxrxytrigger@gmail.com>
Co-authored-by: loverustfs <hello@rustfs.com>
This commit is contained in:
yxrxy
2026-02-14 10:09:47 +08:00
committed by GitHub
parent b3daa80e72
commit 23f79ae88f
3 changed files with 86 additions and 37 deletions
+3 -4
View File
@@ -133,8 +133,7 @@ where
if let Err(e) = self.clone().load().await {
if attempt == MAX_RETRIES - 1 {
self.state.store(IamState::Error as u8, Ordering::SeqCst);
error!("IAM fail to load initial data after {} attempts: {:?}", MAX_RETRIES, e);
return Err(e);
warn!("IAM failed to load initial data after {} attempts: {:?}", MAX_RETRIES, e);
} else {
warn!("IAM load failed, retrying... attempt {}", attempt + 1);
tokio::time::sleep(Duration::from_secs(1)).await;
@@ -162,7 +161,7 @@ where
_ = ticker.tick() => {
info!("iam load ticker");
if let Err(err) =s.clone().load().await{
error!("iam load err {:?}", err);
warn!("iam load err {:?}", err);
}
},
i = receiver.recv() => {
@@ -173,7 +172,7 @@ where
if last <= t {
info!("iam load receiver load");
if let Err(err) =s.clone().load().await{
error!("iam load err {:?}", err);
warn!("iam load err {:?}", err);
}
ticker.reset();
}