refactor: continue storage api contract cleanup (#3580)

* refactor: move delete object contracts to storage api

* refactor: narrow store api compatibility exports

* refactor: route table catalog test through storage compat
This commit is contained in:
安正超
2026-06-18 22:42:02 +08:00
committed by GitHub
parent 80144ec886
commit c28fee0013
24 changed files with 310 additions and 113 deletions
+2 -2
View File
@@ -28,11 +28,11 @@ pub(crate) mod storage_compat;
pub mod timeout_wrapper;
pub mod tonic_service;
pub(crate) type StorageDeletedObject = crate::storage::storage_compat::ecstore::store_api::DeletedObject;
pub(crate) type StorageDeletedObject = rustfs_storage_api::DeletedObject;
pub(crate) type StorageGetObjectReader = crate::storage::storage_compat::ecstore::store_api::GetObjectReader;
pub(crate) type StorageObjectInfo = crate::storage::storage_compat::ecstore::store_api::ObjectInfo;
pub(crate) type StorageObjectOptions = crate::storage::storage_compat::ecstore::store_api::ObjectOptions;
pub(crate) type StorageObjectToDelete = crate::storage::storage_compat::ecstore::store_api::ObjectToDelete;
pub(crate) type StorageObjectToDelete = rustfs_storage_api::ObjectToDelete;
pub(crate) type StoragePutObjReader = crate::storage::storage_compat::ecstore::store_api::PutObjReader;
#[cfg(test)]
+5 -1
View File
@@ -15,9 +15,13 @@
pub(crate) mod ecstore {
pub(crate) use rustfs_ecstore::{
admin_server_info, bucket, client, disk, error, get_global_lock_client, global, metrics_realtime,
resolve_object_store_handle, rio, rpc, set_disk, store, store_api,
resolve_object_store_handle, rio, rpc, set_disk, store,
};
pub(crate) mod store_api {
pub(crate) use rustfs_ecstore::store_api::{GetObjectReader, ObjectInfo, ObjectOptions, PutObjReader};
}
#[cfg(test)]
pub(crate) use rustfs_ecstore::config;
}
+1 -3
View File
@@ -10481,9 +10481,7 @@ mod tests {
.await
.unwrap();
backend.seed_object(bucket, &new_metadata, b"{}".to_vec()).await;
backend
.fail_put_attempt(rustfs_ecstore::disk::RUSTFS_META_BUCKET, &commit_path, 2)
.await;
backend.fail_put_attempt(RUSTFS_META_BUCKET, &commit_path, 2).await;
store
.commit_table(TableCommitRequest {