Skip to content

Commit

Permalink
remove some useless codes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rachelint committed May 4, 2023
1 parent aed5e49 commit cb1567c
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 14 deletions.
2 changes: 0 additions & 2 deletions analytic_engine/src/instance/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,6 @@ pub struct Instance {
pub(crate) db_write_buffer_size: usize,
/// Space write buffer size
pub(crate) space_write_buffer_size: usize,
/// The ratio of table's write buffer size to trigger preflush
pub(crate) preflush_write_buffer_size_ratio: f32,
/// Replay wal batch size
pub(crate) replay_batch_size: usize,
/// Write sst max buffer size
Expand Down
9 changes: 3 additions & 6 deletions analytic_engine/src/instance/open.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use std::{
use common_types::schema::IndexInWriterSchema;
use log::{debug, error, info, trace};
use object_store::ObjectStoreRef;
use snafu::{OptionExt, ResultExt};
use snafu::ResultExt;
use table_engine::engine::OpenTableRequest;
use wal::{
log_batch::LogEntry,
Expand All @@ -23,9 +23,7 @@ use crate::{
engine,
instance::{
self,
engine::{
ApplyMemTable, FlushTable, OpenManifest, ReadMetaUpdate, ReadWal, Result,
},
engine::{ApplyMemTable, FlushTable, OpenManifest, ReadMetaUpdate, ReadWal, Result},
flush_compaction::TableFlushOptions,
mem_collector::MemUsageCollector,
serial_executor::TableOpSerialExecutor,
Expand All @@ -40,7 +38,7 @@ use crate::{
factory::{FactoryRef as SstFactoryRef, ObjectStorePickerRef, ScanOptions},
file::FilePurger,
},
table::data::{TableDataRef},
table::data::TableDataRef,
table_meta_set_impl::TableMetaSetImpl,
};

Expand Down Expand Up @@ -124,7 +122,6 @@ impl Instance {
mem_usage_collector: Arc::new(MemUsageCollector::default()),
db_write_buffer_size: ctx.config.db_write_buffer_size,
space_write_buffer_size: ctx.config.space_write_buffer_size,
preflush_write_buffer_size_ratio: ctx.config.preflush_write_buffer_size_ratio,
replay_batch_size: ctx.config.replay_batch_size,
write_sst_max_buffer_size: ctx.config.write_sst_max_buffer_size.as_byte() as usize,
max_bytes_per_write_batch: ctx
Expand Down
5 changes: 3 additions & 2 deletions analytic_engine/src/manifest/details.rs
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,8 @@ mod tests {
meta_edit::{
AddTableMeta, AlterOptionsMeta, AlterSchemaMeta, DropTableMeta, MetaEdit,
MetaUpdate, VersionEditMeta,
}, LoadRequest, Manifest,
},
LoadRequest, Manifest,
},
table::data::TableShardInfo,
TableOptions,
Expand Down Expand Up @@ -768,7 +769,7 @@ mod tests {

match meta_edit {
MetaEdit::Update(update) => {
builder.apply_update(update);
builder.apply_update(update).unwrap();
}
MetaEdit::Snapshot(meta_snapshot) => {
let MetaSnapshot {
Expand Down
5 changes: 1 addition & 4 deletions analytic_engine/src/manifest/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@ use common_types::table::ShardId;
use common_util::error::GenericResult;
use table_engine::table::TableId;

use crate::{
manifest::{meta_edit::MetaEditRequest},
space::SpaceId,
};
use crate::{manifest::meta_edit::MetaEditRequest, space::SpaceId};

#[derive(Debug)]
pub struct LoadRequest {
Expand Down
1 change: 1 addition & 0 deletions analytic_engine/src/table_meta_set_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ use crate::{
pub(crate) struct TableMetaSetImpl {
pub(crate) spaces: SpacesRef,
pub(crate) file_purger: FilePurgerRef,
// TODO: maybe not suitable to place this parameter here?
pub(crate) preflush_write_buffer_size_ratio: f32,
}

Expand Down

0 comments on commit cb1567c

Please sign in to comment.