feat(storage): add a guide on storage

This commit is contained in:
Edouard Vanbelle
2026-08-01 17:50:35 +02:00
parent f409658c96
commit 142afecbbf
8 changed files with 200 additions and 20 deletions
@@ -119,9 +119,8 @@ pub struct StorageMigrationService {
/// restart. Shared with `CoreServices.blob_backend_hot_swap` —
/// same instance the coerced `blob_backend: Arc<dyn ...>`
/// delegates through.
blob_backend_hot_swap: Arc<
crate::infrastructure::services::swappable_blob_backend::SwappableBlobBackend,
>,
blob_backend_hot_swap:
Arc<crate::infrastructure::services::swappable_blob_backend::SwappableBlobBackend>,
}
impl StorageMigrationService {
@@ -700,8 +699,9 @@ impl StorageMigrationService {
// 4. Drop read-only. In this order (after swap) so no write
// slips through against the OLD backend between "readonly
// off" and "backend swapped".
let readonly_persisted =
persist_migration_readonly(self.pool.as_ref(), false).await.is_ok();
let readonly_persisted = persist_migration_readonly(self.pool.as_ref(), false)
.await
.is_ok();
self.migration_readonly.store(false, Ordering::Relaxed);
if !readonly_persisted {