refactor(storage-api): remove namespace lock from StorageAPI (#3365)

* refactor(storage-api): remove namespace lock from StorageAPI

* test(scanner): wait for runtime budget cancellation

---------

Co-authored-by: loverustfs <hello@rustfs.com>
This commit is contained in:
安正超
2026-06-11 22:42:12 +08:00
committed by GitHub
parent 82af181dcf
commit a85cc0354c
14 changed files with 126 additions and 106 deletions
@@ -12,7 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
use rustfs_ecstore::{disk::DiskStore, error::Error, store::ECStore};
use rustfs_ecstore::{
disk::DiskStore,
error::Error,
store::ECStore,
store_api::{NamespaceLocking, StorageAPI},
};
use rustfs_storage_api::StorageAdminApi;
fn storage_admin_api_type_name<T>() -> &'static str
@@ -27,7 +32,19 @@ where
std::any::type_name::<T>()
}
fn storage_api_with_namespace_locking_type_name<T>() -> &'static str
where
T: StorageAPI + NamespaceLocking,
{
std::any::type_name::<T>()
}
#[test]
fn ecstore_implements_storage_admin_api_contract() {
assert!(storage_admin_api_type_name::<ECStore>().ends_with("::ECStore"));
}
#[test]
fn ecstore_implements_storage_api_and_namespace_locking_contracts() {
assert!(storage_api_with_namespace_locking_type_name::<ECStore>().ends_with("::ECStore"));
}