aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxenoxeno <xeno@ydb.tech>2022-09-15 15:45:37 +0300
committerxenoxeno <xeno@ydb.tech>2022-09-15 15:45:37 +0300
commit343f348b324943ca4364be11cad7c9e69fec348c (patch)
treeda6b38914bb3f12d1894964796129e35eb7c1a00
parente99a581f42640ba07dbed6600bc905ed721fcc77 (diff)
downloadydb-343f348b324943ca4364be11cad7c9e69fec348c.tar.gz
ignore serverless databases by default
-rw-r--r--ydb/core/health_check/health_check.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/ydb/core/health_check/health_check.cpp b/ydb/core/health_check/health_check.cpp
index f85db5e5271..1a55044d5e3 100644
--- a/ydb/core/health_check/health_check.cpp
+++ b/ydb/core/health_check/health_check.cpp
@@ -440,7 +440,7 @@ public:
TTabletRequestsState TabletRequests;
TDuration Timeout = TDuration::MilliSeconds(10000);
-
+ bool IgnoreServerlessDatabases = true;
static constexpr TStringBuf STATIC_STORAGE_POOL_NAME = "static";
void Bootstrap() {
@@ -462,6 +462,7 @@ public:
TabletRequests.TabletStates[ConsoleId].Type = TTabletTypes::Console;
if (FilterDatabase) {
if (FilterDatabase != DomainPath) {
+ IgnoreServerlessDatabases = false; // we don't ignore sl database if it was exactly specified
RequestTenantStatus(FilterDatabase);
} else {
TTenantInfo& tenant = TenantByPath[DomainPath];
@@ -953,9 +954,13 @@ public:
Ydb::Cms::GetDatabaseStatusResult getTenantStatusResult;
operation.result().UnpackTo(&getTenantStatusResult);
TString path = getTenantStatusResult.path();
- DatabaseStatusByPath[path] = std::move(getTenantStatusResult);
- DatabaseState[path];
- RequestSchemeCacheNavigate(path);
+ if (!getTenantStatusResult.has_serverless_resources() || !IgnoreServerlessDatabases) {
+ DatabaseStatusByPath[path] = std::move(getTenantStatusResult);
+ DatabaseState[path];
+ RequestSchemeCacheNavigate(path);
+ } else {
+ DatabaseState.erase(path);
+ }
}
RequestDone("TEvGetTenantStatusResponse");
}