mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-08 14:22:58 +00:00
fix: checkpoint fails when deleting old logs fails (#1300)
This commit is contained in:
@@ -19,7 +19,7 @@ use std::sync::Arc;
|
||||
use std::time::Duration;
|
||||
|
||||
use async_trait::async_trait;
|
||||
use common_telemetry::info;
|
||||
use common_telemetry::{error, info};
|
||||
use object_store::ObjectStore;
|
||||
use store_api::manifest::action::ProtocolAction;
|
||||
use store_api::manifest::{
|
||||
@@ -116,10 +116,17 @@ impl Checkpointer for RegionManifestCheckpointer {
|
||||
};
|
||||
|
||||
manifest.save_checkpoint(&checkpoint).await?;
|
||||
manifest
|
||||
if let Err(e) = manifest
|
||||
.manifest_store()
|
||||
.delete(start_version, last_version + 1)
|
||||
.await?;
|
||||
.await
|
||||
{
|
||||
// It doesn't matter when deletion fails, they will be purged by gc task.
|
||||
error!(e; "Failed to delete manifest logs [{},{}] in path: {}.",
|
||||
start_version,
|
||||
last_version,
|
||||
manifest.manifest_store().path());
|
||||
}
|
||||
|
||||
info!("Region manifest checkpoint, start_version: {}, last_version: {}, compacted actions: {}", start_version, last_version, compacted_actions);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user