Skip to content

Commit

Permalink
refactor: rename created_at to loading_started_at
Browse files Browse the repository at this point in the history
  • Loading branch information
koivunej committed Apr 26, 2023
1 parent 717ccec commit 3efeccb
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pageserver/src/tenant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,9 @@ pub struct Tenant {
// Global pageserver config parameters
pub conf: &'static PageServerConf,

/// The creation timestamp, used to measure activation delay, see:
/// The value creation timestamp, used to measure activation delay, see:
/// <https://github.com/neondatabase/neon/issues/4025>
created_at: Instant,
loading_started_at: Instant,

state: watch::Sender<TenantState>,

Expand Down Expand Up @@ -1518,7 +1518,7 @@ impl Tenant {
}
}

let elapsed = self.created_at.elapsed();
let elapsed = self.loading_started_at.elapsed();
let total_timelines = timelines_accessor.len();

// log a lot of stuff, because some tenants sometimes suffer from user-visible
Expand Down Expand Up @@ -1838,7 +1838,9 @@ impl Tenant {
Tenant {
tenant_id,
conf,
created_at: Instant::now(),
// using now here is good enough approximation to catch tenants with really long
// activation times.
loading_started_at: Instant::now(),
tenant_conf: Arc::new(RwLock::new(tenant_conf)),
timelines: Mutex::new(HashMap::new()),
gc_cs: tokio::sync::Mutex::new(()),
Expand Down

0 comments on commit 3efeccb

Please sign in to comment.