Skip to content

Commit c850697

Browse files
authored
fix timeout in tenantinfo handler (#11384)
1 parent 804f3d6 commit c850697

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

ydb/core/viewer/viewer_tenantinfo.h

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,13 @@ class TJsonTenantInfo : public TViewerPipeClient {
227227
NavigateKeySetResult[path] = MakeRequestSchemeCacheNavigate(path);
228228
}
229229
}
230+
if (getTenantStatusResult.has_serverless_resources()) {
231+
tenant.SetType(NKikimrViewer::Serverless);
232+
TString sharedPath = getTenantStatusResult.serverless_resources().shared_database_path();
233+
if (NavigateKeySetResult.count(sharedPath) == 0) {
234+
NavigateKeySetResult[sharedPath] = MakeRequestSchemeCacheNavigate(sharedPath);
235+
}
236+
}
230237
for (const Ydb::Cms::StorageUnits& unit : getTenantStatusResult.allocated_resources().storage_units()) {
231238
NKikimrViewer::TTenantResource& resource = *tenant.MutableResources()->AddAllocated();
232239
resource.SetType("storage");
@@ -388,11 +395,7 @@ class TJsonTenantInfo : public TViewerPipeClient {
388395
}
389396
NKikimrViewer::TTenant& tenant = TenantBySubDomainKey[domainInfo->DomainKey];
390397
if (domainInfo->ResourcesDomainKey != domainInfo->DomainKey) {
391-
NKikimrViewer::TTenant& sharedTenant = TenantBySubDomainKey[domainInfo->ResourcesDomainKey];
392-
if (sharedTenant.GetType() != NKikimrViewer::Shared) {
393-
sharedTenant.SetType(NKikimrViewer::Shared);
394-
RequestSchemeCacheNavigate(domainInfo->ResourcesDomainKey);
395-
}
398+
396399
tenant.SetType(NKikimrViewer::Serverless);
397400
tenant.SetResourceId(GetDomainId(domainInfo->ResourcesDomainKey));
398401
}
@@ -439,8 +442,10 @@ class TJsonTenantInfo : public TViewerPipeClient {
439442
Subscribers.insert(activeNode);
440443
std::optional<TActorId> cache = MakeDatabaseMetadataCacheId(activeNode);
441444
if (MetadataCacheRequested.insert(ev->Get()->Path).second) {
442-
SelfCheckResults[activeNode] = MakeRequest<NHealthCheck::TEvSelfCheckResultProto>(*cache, new NHealthCheck::TEvSelfCheckRequestProto,
443-
IEventHandle::FlagTrackDelivery | IEventHandle::FlagSubscribeOnSession, activeNode);
445+
if (SelfCheckResults.count(activeNode) == 0) {
446+
SelfCheckResults[activeNode] = MakeRequest<NHealthCheck::TEvSelfCheckResultProto>(*cache, new NHealthCheck::TEvSelfCheckRequestProto,
447+
IEventHandle::FlagTrackDelivery | IEventHandle::FlagSubscribeOnSession, activeNode);
448+
}
444449
}
445450
}
446451
RequestDone();

0 commit comments

Comments
 (0)