remove debug (#912)

* remove debug

* Refactor get_global_encryption_service function

* Refactor get_global_encryption_service function

---------

Co-authored-by: loverustfs <hello@rustfs.com>
Co-authored-by: houseme <housemecn@gmail.com>
This commit is contained in:
Shyim
2025-11-26 04:56:01 +01:00
committed by GitHub
parent 069194f553
commit ee04cc77a0
3 changed files with 2 additions and 35 deletions

View File

@@ -2003,17 +2003,6 @@ impl DiskAPI for LocalDisk {
}
};
// CLAUDE DEBUG: Check if inline data is being preserved
tracing::info!(
"CLAUDE DEBUG: rename_data - Adding version to xlmeta. fi.data.is_some()={}, fi.inline_data()={}, fi.size={}",
fi.data.is_some(),
fi.inline_data(),
fi.size
);
if let Some(ref data) = fi.data {
tracing::info!("CLAUDE DEBUG: rename_data - FileInfo has inline data: {} bytes", data.len());
}
xlmeta.add_version(fi.clone())?;
if xlmeta.versions.len() <= 10 {
@@ -2021,10 +2010,6 @@ impl DiskAPI for LocalDisk {
}
let new_dst_buf = xlmeta.marshal_msg()?;
tracing::info!(
"CLAUDE DEBUG: rename_data - Marshaled xlmeta, new_dst_buf size: {} bytes",
new_dst_buf.len()
);
self.write_all(src_volume, format!("{}/{}", &src_path, STORAGE_FORMAT_FILE).as_str(), new_dst_buf.into())
.await?;

View File

@@ -71,9 +71,6 @@ impl KmsServiceManager {
/// Configure KMS with new configuration
pub async fn configure(&self, new_config: KmsConfig) -> Result<()> {
info!("CLAUDE DEBUG: configure() called with backend: {:?}", new_config.backend);
info!("Configuring KMS with backend: {:?}", new_config.backend);
// Update configuration
{
let mut config = self.config.write().await;
@@ -92,7 +89,6 @@ impl KmsServiceManager {
/// Start KMS service with current configuration
pub async fn start(&self) -> Result<()> {
info!("CLAUDE DEBUG: start() called");
let config = {
let config_guard = self.config.read().await;
match config_guard.as_ref() {
@@ -270,12 +266,6 @@ pub fn get_global_kms_service_manager() -> Option<Arc<KmsServiceManager>> {
/// Get global encryption service (if KMS is running)
pub async fn get_global_encryption_service() -> Option<Arc<ObjectEncryptionService>> {
info!("CLAUDE DEBUG: get_global_encryption_service called");
let manager = get_global_kms_service_manager().unwrap_or_else(|| {
warn!("CLAUDE DEBUG: KMS service manager not initialized, initializing now as fallback");
init_global_kms_service_manager()
});
let service = manager.get_encryption_service().await;
info!("CLAUDE DEBUG: get_encryption_service returned: {}", service.is_some());
service
let manager = get_global_kms_service_manager().unwrap_or_else(init_global_kms_service_manager);
manager.get_encryption_service().await
}

View File

@@ -540,14 +540,6 @@ async fn add_bucket_notification_configuration(buckets: Vec<String>) {
/// Initialize KMS system and configure if enabled
#[instrument(skip(opt))]
async fn init_kms_system(opt: &config::Opt) -> Result<()> {
println!("CLAUDE DEBUG: init_kms_system called!");
info!("CLAUDE DEBUG: init_kms_system called!");
info!("Initializing KMS service manager...");
info!(
"CLAUDE DEBUG: KMS configuration - kms_enable: {}, kms_backend: {}, kms_key_dir: {:?}, kms_default_key_id: {:?}",
opt.kms_enable, opt.kms_backend, opt.kms_key_dir, opt.kms_default_key_id
);
// Initialize global KMS service manager (starts in NotConfigured state)
let service_manager = rustfs_kms::init_global_kms_service_manager();