Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions rust/cubestore/cubestore/src/metastore/chunks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@ impl Chunk {
self.partition_id
}

pub fn unset_min_max(&self) -> Self {
let mut to_update = self.clone();
to_update.min = None;
to_update.max = None;
to_update
}

pub fn set_partition_id(&self, partition_id: u64) -> Self {
let mut to_update = self.clone();
to_update.partition_id = partition_id;
Expand Down
10 changes: 10 additions & 0 deletions rust/cubestore/cubestore/src/queryplanner/planning.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1300,6 +1300,16 @@ fn pick_partitions(
continue;
}

//FIXME !!!!! emergency fix for APM, need to be solved on another way
let chunks = chunks
.into_iter()
.map(|c| {
let id = c.id;
let chunk = c.into_row().unset_min_max();
IdRow::new(id, chunk)
})
.collect::<Vec<_>>();

partition_snapshots.push(PartitionSnapshot { chunks, partition });
}
log::trace!(
Expand Down
Loading