refactor: expose external ECStore owner symbols (#3748)

This commit is contained in:
Zhengchao An
2026-06-22 21:42:54 +08:00
committed by GitHub
parent 418b5d04f9
commit db7ff8f513
7 changed files with 127 additions and 79 deletions
+25 -4
View File
@@ -15,11 +15,10 @@
use datafusion::{common::DataFusionError, sql::sqlparser::parser::ParserError};
use snafu::{Backtrace, Location, Snafu};
use std::fmt::Display;
use std::sync::Arc;
pub(crate) use rustfs_ecstore::api::error as ecstore_error;
pub(crate) use rustfs_ecstore::api::global as ecstore_global;
pub(crate) use rustfs_ecstore::api::set_disk as ecstore_set_disk;
pub(crate) use rustfs_ecstore::api::storage as ecstore_storage;
pub(crate) use rustfs_ecstore::api::error::StorageError as SelectStorageError;
pub(crate) use rustfs_ecstore::api::storage::ECStore as SelectStore;
pub mod object_store;
pub mod query;
@@ -30,6 +29,28 @@ mod test;
pub type QueryResult<T> = Result<T, QueryError>;
pub(crate) type SelectGetObjectReader = <SelectStore as rustfs_storage_api::ObjectIO>::GetObjectReader;
pub(crate) type SelectObjectInfo = <SelectStore as rustfs_storage_api::ObjectOperations>::ObjectInfo;
pub(crate) type SelectObjectOptions = <SelectStore as rustfs_storage_api::ObjectOperations>::ObjectOptions;
pub(crate) const SELECT_DEFAULT_READ_BUFFER_SIZE: usize = rustfs_ecstore::api::set_disk::DEFAULT_READ_BUFFER_SIZE;
pub(crate) fn resolve_select_object_store_handle() -> Option<Arc<SelectStore>> {
rustfs_ecstore::api::global::resolve_object_store_handle()
}
pub(crate) fn select_is_err_bucket_not_found(err: &SelectStorageError) -> bool {
rustfs_ecstore::api::error::is_err_bucket_not_found(err)
}
pub(crate) fn select_is_err_object_not_found(err: &SelectStorageError) -> bool {
rustfs_ecstore::api::error::is_err_object_not_found(err)
}
pub(crate) fn select_is_err_version_not_found(err: &SelectStorageError) -> bool {
rustfs_ecstore::api::error::is_err_version_not_found(err)
}
#[derive(Debug, Snafu)]
#[snafu(visibility(pub))]
pub enum QueryError {