mirror of
https://github.com/neondatabase/neon.git
synced 2026-05-14 03:30:36 +00:00
release mutex guard early in test
Signed-off-by: Yuchen Liang <yuchen@neon.tech>
This commit is contained in:
@@ -4301,9 +4301,11 @@ mod tests {
|
||||
|
||||
let _ = timeline.make_lsn_lease(Lsn(0x30), &ctx)?;
|
||||
|
||||
let gc_info = timeline.gc_info.read().unwrap();
|
||||
assert!(gc_info.leases.contains_key(&Lsn(0x30)));
|
||||
info!("GcCutOff: {:?}", gc_info.cutoffs);
|
||||
{
|
||||
let gc_info = timeline.gc_info.read().unwrap();
|
||||
assert!(gc_info.leases.contains_key(&Lsn(0x30)));
|
||||
info!("GcCutOff: {:?}", gc_info.cutoffs);
|
||||
}
|
||||
let res = tenant
|
||||
.gc_iteration(
|
||||
Some(TIMELINE_ID),
|
||||
|
||||
@@ -4917,7 +4917,7 @@ impl Timeline {
|
||||
// Gets the minimum LSN that holds the valid lease.
|
||||
// Caveat: This value could be stale since we rely on refresh_gc_info to invalidate leases,
|
||||
// so there could be leases invalidated between the refresh and here.
|
||||
let min_lsn_with_valid_lease = gc_info.leases.last_key_value().map(|(lsn, _)| *lsn);
|
||||
let min_lsn_with_valid_lease = gc_info.leases.first_key_value().map(|(lsn, _)| *lsn);
|
||||
(
|
||||
horizon_cutoff,
|
||||
pitr_cutoff,
|
||||
|
||||
Reference in New Issue
Block a user