Skip to content

Commit 058e57e

Browse files
committed
fix compile and clippy.
1 parent 32131c3 commit 058e57e

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

analytic_engine/src/instance/open.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use std::{
88
};
99

1010
use common_types::schema::IndexInWriterSchema;
11-
use log::{debug, error, info, trace, warn};
11+
use log::{debug, error, info, trace};
1212
use object_store::ObjectStoreRef;
1313
use snafu::ResultExt;
1414
use table_engine::engine::OpenTableRequest;
@@ -24,8 +24,8 @@ use crate::{
2424
instance::{
2525
self,
2626
engine::{
27-
ApplyMemTable, FlushTable, OpenManifest, OperateByWriteWorker, ReadMetaUpdate, ReadWal,
28-
RecoverTableData, Result,
27+
ApplyMemTable, FlushTable, OpenManifest, ReadMetaUpdate, ReadWal, RecoverTableData,
28+
Result,
2929
},
3030
flush_compaction::TableFlushOptions,
3131
mem_collector::MemUsageCollector,

analytic_engine/src/manifest/details.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,6 @@ impl TableSnapshotProvider for TableSnapshotProviderImpl {
209209
table_name: table_data.name.to_string(),
210210
schema: table_data.schema(),
211211
opts: table_data.table_options().as_ref().clone(),
212-
partition_info: table_data.partition_info.clone(),
213212
};
214213

215214
let version_snapshot = table_data.current_version().snapshot();
@@ -328,20 +327,20 @@ where
328327
/// Create a latest snapshot of the current logs.
329328
async fn build(&self) -> Result<Option<Snapshot>> {
330329
// Get snapshot data from memory.
331-
let snapshot_data = self
330+
let table_snapshot_opt = self
332331
.snapshot_data_provider
333332
.get_table_snapshot(self.space_id, self.table_id)?;
334333
let snapshot = Snapshot {
335334
end_seq: self.end_seq,
336-
data: snapshot_data,
335+
data: table_snapshot_opt,
337336
};
338337

339338
// Update the current snapshot to the new one.
340339
self.snapshot_store.store(&snapshot).await?;
341340
// Delete the expired logs after saving the snapshot.
342341
// TODO: Actually this operation can be performed background, and the failure of
343342
// it can be ignored.
344-
self.log_store.delete_up_to(dbg!(snapshot.end_seq)).await?;
343+
self.log_store.delete_up_to(snapshot.end_seq).await?;
345344

346345
Ok(Some(snapshot))
347346
}

analytic_engine/src/table/data.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -181,10 +181,7 @@ fn compute_mutable_limit(
181181
write_buffer_size: u32,
182182
mutable_limit_write_buffer_size_ratio: f32,
183183
) -> u32 {
184-
assert!(
185-
mutable_limit_write_buffer_size_ratio >= 0.0
186-
&& mutable_limit_write_buffer_size_ratio <= 1.0
187-
);
184+
assert!((0.0..=1.0).contains(&mutable_limit_write_buffer_size_ratio));
188185

189186
let limit = write_buffer_size as f32 * mutable_limit_write_buffer_size_ratio;
190187
// This is safe because the limit won't be larger than the write_buffer_size.

0 commit comments

Comments
 (0)