Skip to content

Commit

Permalink
Fix refactoring bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ethe committed Dec 16, 2024
1 parent 3751742 commit 9d05f1c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
10 changes: 8 additions & 2 deletions src/compaction/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,15 @@ where

let mutable = mem::replace(
&mut guard.mutable,
Mutable::new(&self.option, trigger_clone, self.manager.base_fs()).await?,
Mutable::new(
&self.option,
trigger_clone,
self.manager.base_fs(),
self.record_schema.clone(),
)
.await?,
);
let (file_id, immutable) = mutable.into_immutable(&guard.record_instance).await?;
let (file_id, immutable) = mutable.into_immutable().await?;
guard.immutables.push((file_id, immutable));
} else if !is_manual {
return Ok(());
Expand Down
1 change: 0 additions & 1 deletion src/option.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ pub struct DbOption<R> {
pub(crate) clean_channel_buffer: usize,
pub(crate) base_path: Path,
pub(crate) base_fs: FsOptions,
// TODO: DEBUG
pub(crate) level_paths: Vec<Option<(Path, FsOptions)>>,
pub(crate) immutable_chunk_num: usize,
pub(crate) immutable_chunk_max_num: usize,
Expand Down
11 changes: 10 additions & 1 deletion src/record/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,16 @@ impl Schema for DynSchema {
}

fn primary_key_path(&self) -> (ColumnPath, Vec<SortingColumn>) {
unimplemented!()
(
ColumnPath::new(vec![
"_ts".to_string(),
self.schema[self.primary_index].name.clone(),
]),
vec![
SortingColumn::new(1_i32, true, true),
SortingColumn::new(self.primary_key_index() as i32, false, true),
],
)
}
}

Expand Down

0 comments on commit 9d05f1c

Please sign in to comment.