mirror of
https://github.com/neondatabase/neon.git
synced 2026-06-02 04:50:38 +00:00
Update pageserver/src/tenant/mgr.rs
Co-authored-by: Joonas Koivunen <joonas@neon.tech>
This commit is contained in:
committed by
GitHub
parent
41f2db3a58
commit
012539a0e7
@@ -633,12 +633,12 @@ pub enum TenantMapListError {
|
||||
///
|
||||
/// Get list of tenants, for the mgmt API
|
||||
///
|
||||
#[cfg(feature = "testing")]
|
||||
// Many tests are using list_tenants to check if tenant is in active state
|
||||
// With lazy loading tenants are initially in NotLoaded state.
|
||||
// To make all this tests pass, lets force loading of tenants if testing feature is specified.
|
||||
// Alternatively it is possible to pass extra parameter to list_tenants to choose between
|
||||
// eager and lazy loading of tenants.
|
||||
#[cfg(feature = "testing")]
|
||||
pub async fn list_tenants() -> Result<Vec<(TenantId, TenantState)>, TenantMapListError> {
|
||||
let tenants = TENANTS.read().await;
|
||||
match &*tenants {
|
||||
|
||||
Reference in New Issue
Block a user