Skip to content

Commit dae798d

Browse files
alexv-smirnovRaubzeug
authored andcommitted
build: refresh Embedded UI (v6.36.1) (ydb-platform#11833)
Co-authored-by: Raubzeug <Raubzeug@users.noreply.github.com>
1 parent ea7a15c commit dae798d

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

ydb/core/viewer/json_pipe_req.cpp

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -763,13 +763,15 @@ void TViewerPipeClient::HandleResolveResource(TEvTxProxySchemeCache::TEvNavigate
763763
SharedDatabase = CanonizePath(entry.Path);
764764
if (SharedDatabase == AppData()->TenantName) {
765765
Direct = true;
766-
return Bootstrap(); // retry bootstrap without redirect this time
766+
Bootstrap(); // retry bootstrap without redirect this time
767+
} else {
768+
DatabaseBoardInfoResponse = MakeRequestStateStorageEndpointsLookup(SharedDatabase);
767769
}
768-
DatabaseBoardInfoResponse = MakeRequestStateStorageEndpointsLookup(SharedDatabase);
769770
} else {
770-
ReplyAndPassAway(GetHTTPBADREQUEST("text/plain", "Failed to resolve database - shared database not found"));
771+
return ReplyAndPassAway(GetHTTPBADREQUEST("text/plain", "Failed to resolve database - shared database not found"));
771772
}
772773
}
774+
RequestDone();
773775
}
774776

775777
void TViewerPipeClient::HandleResolveDatabase(TEvTxProxySchemeCache::TEvNavigateKeySetResult::TPtr& ev) {
@@ -780,24 +782,27 @@ void TViewerPipeClient::HandleResolveDatabase(TEvTxProxySchemeCache::TEvNavigate
780782
if (entry.DomainInfo && entry.DomainInfo->ResourcesDomainKey && entry.DomainInfo->DomainKey != entry.DomainInfo->ResourcesDomainKey) {
781783
ResourceNavigateResponse = MakeRequestSchemeCacheNavigate(TPathId(entry.DomainInfo->ResourcesDomainKey));
782784
Become(&TViewerPipeClient::StateResolveResource);
783-
return;
785+
} else {
786+
DatabaseBoardInfoResponse = MakeRequestStateStorageEndpointsLookup(CanonizePath(entry.Path));
784787
}
785-
DatabaseBoardInfoResponse = MakeRequestStateStorageEndpointsLookup(CanonizePath(entry.Path));
786788
} else {
787-
ReplyAndPassAway(GetHTTPBADREQUEST("text/plain", "Failed to resolve database - not found"));
789+
return ReplyAndPassAway(GetHTTPBADREQUEST("text/plain", "Failed to resolve database - not found"));
788790
}
789791
}
792+
RequestDone();
790793
}
791794

792795
void TViewerPipeClient::HandleResolve(TEvStateStorage::TEvBoardInfo::TPtr& ev) {
793796
if (DatabaseBoardInfoResponse) {
794797
DatabaseBoardInfoResponse->Set(std::move(ev));
795798
if (DatabaseBoardInfoResponse->IsOk()) {
796-
ReplyAndPassAway(MakeForward(GetNodesFromBoardReply(DatabaseBoardInfoResponse->GetRef())));
799+
return ReplyAndPassAway(MakeForward(GetNodesFromBoardReply(DatabaseBoardInfoResponse->GetRef())));
797800
} else {
798-
ReplyAndPassAway(GetHTTPBADREQUEST("text/plain", "Failed to resolve database - no nodes found"));
801+
Direct = true;
802+
Bootstrap(); // retry bootstrap without redirect this time
799803
}
800804
}
805+
RequestDone();
801806
}
802807

803808
void TViewerPipeClient::HandleTimeout() {
@@ -825,6 +830,7 @@ void TViewerPipeClient::RedirectToDatabase(const TString& database) {
825830
Become(&TViewerPipeClient::StateResolveDatabase);
826831
}
827832

833+
// Call only from Bootstrap() method
828834
bool TViewerPipeClient::NeedToRedirect() {
829835
if (Event) {
830836
Direct |= !Event->Get()->Request.GetHeader("X-Forwarded-From-Node").empty(); // we're already forwarding

0 commit comments

Comments
 (0)