mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-15 17:32:56 +00:00
layere: record residency changes with download/evict
This commit is contained in:
@@ -984,6 +984,11 @@ impl LayerE {
|
||||
kind: tokio::sync::OnceCell::default(),
|
||||
});
|
||||
|
||||
self.access_stats.record_residence_event(
|
||||
LayerResidenceStatus::Resident,
|
||||
LayerResidenceEventReason::ResidenceChange,
|
||||
);
|
||||
|
||||
Ok(if self.wanted_evicted.load(Ordering::Acquire) {
|
||||
// because we reset wanted_evictness earlier, this most likely means when we were downloading someone
|
||||
// wanted to evict this layer.
|
||||
@@ -1156,6 +1161,8 @@ impl LayerE {
|
||||
|
||||
let res = capture_mtime_and_delete.await;
|
||||
|
||||
this.access_stats.record_residence_event(LayerResidenceStatus::Evicted, LayerResidenceEventReason::ResidenceChange);
|
||||
|
||||
drop(this.status.send(Status::Evicted));
|
||||
|
||||
match res {
|
||||
|
||||
Reference in New Issue
Block a user