Skip to content

Commit

Permalink
chore: add warn log for denied to renew region lease (#3827)
Browse files Browse the repository at this point in the history
chore: add warn log for region lease renewing
  • Loading branch information
WenyXu authored Apr 28, 2024
1 parent f29aebf commit dadee99
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/meta-srv/src/region/lease_keeper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ use common_meta::key::TableMetadataManagerRef;
use common_meta::region_keeper::MemoryRegionKeeperRef;
use common_meta::rpc::router::RegionRoute;
use common_meta::DatanodeId;
use common_telemetry::warn;
use snafu::ResultExt;
use store_api::region_engine::RegionRole;
use store_api::storage::{RegionId, TableId};
Expand Down Expand Up @@ -80,6 +81,10 @@ fn renew_region_lease_via_region_route(
return Some((region_id, RegionRole::Follower));
}

warn!(
"Denied to renew region lease for datanode: {datanode_id}, region_id: {region_id}, region_routes: {:?}",
region_route
);
// The region doesn't belong to this datanode.
None
}
Expand Down Expand Up @@ -140,7 +145,10 @@ impl RegionLeaseKeeper {
return renew_region_lease_via_region_route(&region_route, datanode_id, region_id);
}
}

warn!(
"Denied to renew region lease for datanode: {datanode_id}, region_id: {region_id}, table({}) is not found",
region_id.table_id()
);
None
}

Expand Down

0 comments on commit dadee99

Please sign in to comment.