fix: resolve silent failure in MQTT bucket event notifications (#2112)

Co-authored-by: houseme <housemecn@gmail.com>
This commit is contained in:
simon-escapecode
2026-03-11 02:08:30 +00:00
committed by GitHub
parent 7e8c7fa2b2
commit f00d01ec2d
2 changed files with 12 additions and 26 deletions
+11 -4
View File
@@ -293,10 +293,17 @@ impl TargetRegistry {
}
}
let Some(store) = rustfs_ecstore::global::new_object_layer_fn() else {
return Err(TargetError::ServerNotInitialized(
"Failed to save target configuration: server storage not initialized".to_string(),
));
let store = match rustfs_ecstore::global::new_object_layer_fn() {
Some(s) => s,
None => {
warn!(
"Object store not available at notification init; skipping config persistence. \
{} target(s) active in memory.",
successful_targets.len()
);
info!(count = successful_targets.len(), "All target processing completed");
return Ok(successful_targets);
}
};
match rustfs_ecstore::config::com::save_server_config(store, &new_config).await {