greptimedb icon indicating copy to clipboard operation
greptimedb copied to clipboard

Make region lease duration granted by metasrv dynamic

Open MichaelScofield opened this issue 8 months ago • 0 comments

What type of enhancement is this?

Tech debt reduction

What does the enhancement do?

Now the region lease duration is static:

let region_lease_handler = RegionLeaseHandler::new(
    distributed_time_constants::REGION_LEASE_SECS, <-- static
    table_metadata_manager.clone(),
    memory_region_keeper.clone(),
);

It's better to be calculated dynamically, by each datanode's heartbeat interval.

Implementation challenges

No response

MichaelScofield avatar Jun 06 '24 10:06 MichaelScofield