mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-21 11:56:38 +00:00
refactor: segment residual storage api boundaries (#3905)
This commit is contained in:
@@ -36,7 +36,7 @@ use criterion::{BenchmarkId, Criterion, Throughput, criterion_group, criterion_m
|
||||
mod storage_api;
|
||||
use std::hint::black_box;
|
||||
use std::time::Duration;
|
||||
use storage_api::Erasure;
|
||||
use storage_api::comparison::Erasure;
|
||||
|
||||
/// Performance test data configuration
|
||||
struct TestData {
|
||||
|
||||
@@ -49,7 +49,7 @@ mod storage_api;
|
||||
use std::hint::black_box;
|
||||
use std::io::Cursor;
|
||||
use std::time::Duration;
|
||||
use storage_api::{BitrotReader, BitrotWriter, Erasure, calc_shard_size};
|
||||
use storage_api::erasure::{BitrotReader, BitrotWriter, Erasure, calc_shard_size};
|
||||
use tokio::runtime::Runtime;
|
||||
|
||||
/// Benchmark configuration structure
|
||||
|
||||
@@ -18,7 +18,7 @@ mod storage_api;
|
||||
use std::io::Cursor;
|
||||
use std::sync::Arc;
|
||||
use std::time::Duration;
|
||||
use storage_api::{BitrotWriterWrapper, CustomWriter, Erasure};
|
||||
use storage_api::single_block_non_inline::{BitrotWriterWrapper, CustomWriter, Erasure};
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
struct BenchConfig {
|
||||
|
||||
@@ -17,3 +17,15 @@
|
||||
pub(crate) use rustfs_ecstore::api::erasure::{
|
||||
BitrotReader, BitrotWriter, BitrotWriterWrapper, CustomWriter, Erasure, calc_shard_size,
|
||||
};
|
||||
|
||||
pub(crate) mod comparison {
|
||||
pub(crate) use super::Erasure;
|
||||
}
|
||||
|
||||
pub(crate) mod erasure {
|
||||
pub(crate) use super::{BitrotReader, BitrotWriter, Erasure, calc_shard_size};
|
||||
}
|
||||
|
||||
pub(crate) mod single_block_non_inline {
|
||||
pub(crate) use super::{BitrotWriterWrapper, CustomWriter, Erasure};
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ use rustfs_common::heal_channel::HealOpts;
|
||||
use rustfs_filemeta::FileInfo;
|
||||
use rustfs_lock::NamespaceLockWrapper;
|
||||
use rustfs_madmin::heal_commands::HealResultItem;
|
||||
use storage_api::{
|
||||
use storage_api::contract_compat::{
|
||||
CompletePart, DeletedObject, DiskStore, ECStore, Error, GetObjectReader, HTTPRangeSpec, ListMultipartsInfo, ListPartsInfo,
|
||||
MultipartInfo, MultipartUploadResult, ObjectInfo, ObjectOptions, ObjectToDelete, PartInfo, PutObjReader, StorageAdminApi,
|
||||
StorageHealOperations, StorageListObjectVersionsInfo, StorageListObjectsV2Info, StorageListOperations,
|
||||
|
||||
@@ -32,7 +32,7 @@ mod storage_api;
|
||||
use rustfs_filemeta::{FileInfoOpts, get_file_info};
|
||||
use rustfs_utils::HashAlgorithm;
|
||||
use std::path::PathBuf;
|
||||
use storage_api::{DiskOption, Endpoint, STORAGE_FORMAT_FILE, create_bitrot_reader, new_disk};
|
||||
use storage_api::legacy_bitrot_read::{DiskOption, Endpoint, STORAGE_FORMAT_FILE, create_bitrot_reader, new_disk};
|
||||
use tokio::fs;
|
||||
|
||||
fn workspace_root() -> PathBuf {
|
||||
|
||||
@@ -9,7 +9,7 @@ mod storage_api;
|
||||
use rustfs_filemeta::{FileInfo, FileInfoOpts, get_file_info};
|
||||
use serde::Deserialize;
|
||||
use sha2::{Digest, Sha256};
|
||||
use storage_api::{
|
||||
use storage_api::minio_generated_read::{
|
||||
DiskAPI as _, DiskOption, Endpoint, Erasure, GetObjectReader, ObjectInfo, ObjectOptions, create_bitrot_reader, new_disk,
|
||||
};
|
||||
use temp_env::async_with_vars;
|
||||
|
||||
@@ -13,3 +13,23 @@ pub(crate) use rustfs_storage_api::{
|
||||
ObjectInfoOrErr as StorageObjectInfoOrErr, ObjectOperations as StorageObjectOperations, ObjectToDelete, PartInfo,
|
||||
StorageAdminApi, WalkOptions as StorageWalkOptions,
|
||||
};
|
||||
|
||||
pub(crate) mod contract_compat {
|
||||
pub(crate) use super::{
|
||||
CompletePart, DeletedObject, DiskStore, ECStore, Error, GetObjectReader, HTTPRangeSpec, ListMultipartsInfo,
|
||||
ListPartsInfo, MultipartInfo, MultipartUploadResult, ObjectInfo, ObjectOptions, ObjectToDelete, PartInfo, PutObjReader,
|
||||
StorageAdminApi, StorageHealOperations, StorageListObjectVersionsInfo, StorageListObjectsV2Info, StorageListOperations,
|
||||
StorageMultipartOperations, StorageNamespaceLocking, StorageObjectIO, StorageObjectInfoOrErr, StorageObjectOperations,
|
||||
StorageWalkOptions,
|
||||
};
|
||||
}
|
||||
|
||||
pub(crate) mod legacy_bitrot_read {
|
||||
pub(crate) use super::{DiskOption, Endpoint, STORAGE_FORMAT_FILE, create_bitrot_reader, new_disk};
|
||||
}
|
||||
|
||||
pub(crate) mod minio_generated_read {
|
||||
pub(crate) use super::{
|
||||
DiskAPI, DiskOption, Endpoint, Erasure, GetObjectReader, ObjectInfo, ObjectOptions, create_bitrot_reader, new_disk,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user