Skip to content

Commit

Permalink
fix(cubestore): Do not show errors for not uploaded chunks scheduled …
Browse files Browse the repository at this point in the history
…for removal
  • Loading branch information
paveltiunov committed Dec 22, 2021
1 parent cb6b9d5 commit ca94fb2
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions rust/cubestore/src/scheduler/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -797,13 +797,20 @@ impl DataGCLoop {
}
}
GCTask::DeleteChunk(chunk_id) => {
if self.metastore.get_chunk(chunk_id).await.is_ok() {
log::trace!("Removing deactivated chunk {}", chunk_id);
if let Err(e) = self.metastore.delete_chunk(chunk_id).await {
log::error!(
"Could not remove deactivated chunk ({}): {}",
chunk_id,
e
if let Ok(chunk) = self.metastore.get_chunk(chunk_id).await {
if !chunk.get_row().active() {
log::trace!("Removing deactivated chunk {}", chunk_id);
if let Err(e) = self.metastore.delete_chunk(chunk_id).await {
log::error!(
"Could not remove deactivated chunk ({}): {}",
chunk_id,
e
);
}
} else {
log::trace!(
"Skipping removing of chunk {} because it was activated",
chunk_id
);
}
} else {
Expand Down

0 comments on commit ca94fb2

Please sign in to comment.