avoid holding locks when a thread is sleeping

Signed-off-by: Yuchen Liang <yuchen@neon.tech>
This commit is contained in:
Yuchen Liang
2024-06-20 16:01:41 -04:00
parent 8baaccb56c
commit fba409a158

View File

@@ -53,6 +53,7 @@ fn lsn_lease_loop(compute: Arc<ComputeNode>, lsn: Lsn) {
let configs = postgres_configs_from_state(&state);
let cmd = format!("lease lsn {} {} {} ", spec.tenant_id, spec.timeline_id, lsn);
drop(state);
match lsn_lease_request(&configs, &cmd) {
Ok(valid_until) => {