diff --git a/influxdb3_write/src/lib.rs b/influxdb3_write/src/lib.rs index b00697270d5..67ec3afa346 100644 --- a/influxdb3_write/src/lib.rs +++ b/influxdb3_write/src/lib.rs @@ -14,7 +14,6 @@ pub mod persister; pub mod wal; pub mod write_buffer; -use crate::catalog::Catalog; use crate::paths::{ParquetFilePath, SegmentWalFilePath}; use async_trait::async_trait; use bytes::Bytes; @@ -85,19 +84,6 @@ pub trait Bufferer: Debug + Send + Sync + 'static { precision: Precision, ) -> write_buffer::Result; - /// Closes the open segment and returns it so that it can be persisted or thrown away. A new segment will be opened - /// with the catalog rolling over. - async fn close_open_segment(&self) -> Result>; - - /// Once a process opens segments with the Persister, they'll know the last segment that was persisted. - /// This can be used with a `Bufferer` to pass into this method, which will look for any WAL segments with an - /// ID greater than the one passed in. - async fn load_segments_after( - &self, - segment_id: SegmentId, - catalog: Catalog, - ) -> Result>>; - /// Returns the configured WAL, if there is one. fn wal(&self) -> Option>; diff --git a/influxdb3_write/src/wal.rs b/influxdb3_write/src/wal.rs index 7b3282f6f8d..b3eeb2a0986 100644 --- a/influxdb3_write/src/wal.rs +++ b/influxdb3_write/src/wal.rs @@ -660,7 +660,7 @@ fn segment_id_from_file_name(name: &str) -> Result { #[cfg(test)] mod tests { use super::*; - use crate::Catalog; + use crate::catalog::Catalog; use crate::LpWriteOp; use crate::Precision; diff --git a/influxdb3_write/src/write_buffer/mod.rs b/influxdb3_write/src/write_buffer/mod.rs index 29b9f36321b..f9c277b0ff4 100644 --- a/influxdb3_write/src/write_buffer/mod.rs +++ b/influxdb3_write/src/write_buffer/mod.rs @@ -14,8 +14,8 @@ use crate::write_buffer::flusher::WriteBufferFlusher; use crate::write_buffer::loader::load_starting_state; use crate::write_buffer::segment_state::{run_buffer_segment_persist_and_cleanup, SegmentState}; use crate::{ - BufferSegment, BufferedWriteRequest, Bufferer, ChunkContainer, LpWriteOp, Persister, Precision, - SegmentDuration, SegmentId, SequenceNumber, Wal, WalOp, WriteBuffer, WriteLineError, + BufferedWriteRequest, Bufferer, ChunkContainer, LpWriteOp, Persister, Precision, + SegmentDuration, SequenceNumber, Wal, WalOp, WriteBuffer, WriteLineError, }; use async_trait::async_trait; use data_types::{ @@ -394,18 +394,6 @@ impl Bufferer for WriteBufferImpl { .await } - async fn close_open_segment(&self) -> crate::Result> { - todo!() - } - - async fn load_segments_after( - &self, - _segment_id: SegmentId, - _catalog: Catalog, - ) -> crate::Result>> { - todo!() - } - fn wal(&self) -> Option> { self.wal.clone() } @@ -843,7 +831,7 @@ mod tests { use super::*; use crate::persister::PersisterImpl; use crate::wal::WalImpl; - use crate::{SequenceNumber, WalOpBatch}; + use crate::{SegmentId, SequenceNumber, WalOpBatch}; use arrow::record_batch::RecordBatch; use arrow_util::assert_batches_eq; use datafusion_util::config::register_iox_object_store;