diff --git a/rust/sysdb/src/sqlite.rs b/rust/sysdb/src/sqlite.rs index cd4a8b468d2..a3a10447c0c 100644 --- a/rust/sysdb/src/sqlite.rs +++ b/rust/sysdb/src/sqlite.rs @@ -604,6 +604,12 @@ impl SqliteSysDb { .begin() .await .map_err(|e| DeleteCollectionError::Internal(e.into()))?; + // Match create_collection: a deferred transaction lets a concurrent + // create/delete on the same name lose updates. + self.db + .begin_immediate(&mut *tx) + .await + .map_err(|e| DeleteCollectionError::Internal(e.into()))?; let was_found = self .delete_collection_with_conn(&mut *tx, tenant, database, collection_id, segment_ids)