From d458e390ad778ccfdc743913f765f8f9ed468a27 Mon Sep 17 00:00:00 2001 From: "Carol (Nichols || Goulding)" Date: Fri, 6 May 2022 10:43:47 -0400 Subject: [PATCH] fix: Move allow dead code to be more specific in compactor; remove actually dead code --- compactor/src/compact.rs | 17 +---------------- compactor/src/handler.rs | 1 + compactor/src/lib.rs | 1 - compactor/src/utils.rs | 1 + 4 files changed, 3 insertions(+), 17 deletions(-) diff --git a/compactor/src/compact.rs b/compactor/src/compact.rs index 4667e9fa22..6428932717 100644 --- a/compactor/src/compact.rs +++ b/compactor/src/compact.rs @@ -13,7 +13,7 @@ use backoff::{Backoff, BackoffConfig}; use bytes::Bytes; use data_types::{ ParquetFile, ParquetFileId, ParquetFileWithMetadata, PartitionId, SequencerId, TableId, - TablePartition, Timestamp, Tombstone, TombstoneId, + Timestamp, Tombstone, TombstoneId, }; use datafusion::error::DataFusionError; use iox_catalog::interface::{Catalog, Transaction}; @@ -286,21 +286,6 @@ impl Compactor { .context(Level0Snafu) } - async fn level_1_parquet_files( - &self, - table_partition: TablePartition, - min_time: Timestamp, - max_time: Timestamp, - ) -> Result> { - let mut repos = self.catalog.repositories().await; - - repos - .parquet_files() - .level_1(table_partition, min_time, max_time) - .await - .context(Level1Snafu) - } - async fn update_to_level_1(&self, parquet_file_ids: &[ParquetFileId]) -> Result<()> { let mut repos = self.catalog.repositories().await; diff --git a/compactor/src/handler.rs b/compactor/src/handler.rs index 533ac414ba..1763363245 100644 --- a/compactor/src/handler.rs +++ b/compactor/src/handler.rs @@ -48,6 +48,7 @@ fn shared_handle(handle: JoinHandle<()>) -> SharedJoinHandle { #[derive(Debug)] pub struct CompactorHandlerImpl { /// Data to compact + #[allow(dead_code)] compactor_data: Arc, /// A token that is used to trigger shutdown of the background worker diff --git a/compactor/src/lib.rs b/compactor/src/lib.rs index 058967618c..3acd6a70b7 100644 --- a/compactor/src/lib.rs +++ b/compactor/src/lib.rs @@ -10,7 +10,6 @@ clippy::use_self, clippy::clone_on_ref_ptr )] -#![allow(dead_code)] pub mod compact; pub mod garbage_collector; diff --git a/compactor/src/utils.rs b/compactor/src/utils.rs index 5d37afb5a6..e67873a123 100644 --- a/compactor/src/utils.rs +++ b/compactor/src/utils.rs @@ -156,6 +156,7 @@ impl CompactedData { /// Information needed to update the catalog after compacting a group of files #[derive(Debug)] pub struct CatalogUpdate { + #[allow(dead_code)] pub(crate) meta: IoxMetadata, pub(crate) tombstones: BTreeMap, pub(crate) parquet_file: ParquetFileParams,