Skip to content

Commit a8336e4

Browse files
Merge 5ced356 into 1dd2b99
2 parents 1dd2b99 + 5ced356 commit a8336e4

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

ydb/core/viewer/json_pipe_req.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -748,6 +748,12 @@ void TViewerPipeClient::RequestDone(ui32 requests) {
748748
}
749749
}
750750

751+
void TViewerPipeClient::ResetAndBootstrap() {
752+
Requests = 0;
753+
DelayedRequests.clear();
754+
Bootstrap();
755+
}
756+
751757
void TViewerPipeClient::Handle(TEvTabletPipe::TEvClientConnected::TPtr& ev) {
752758
if (ev->Get()->Status != NKikimrProto::OK) {
753759
ui32 requests = FailPipeConnect(ev->Get()->TabletId);
@@ -763,7 +769,7 @@ void TViewerPipeClient::HandleResolveResource(TEvTxProxySchemeCache::TEvNavigate
763769
SharedDatabase = CanonizePath(entry.Path);
764770
if (SharedDatabase == AppData()->TenantName) {
765771
Direct = true;
766-
return Bootstrap(); // retry bootstrap without redirect this time
772+
return ResetAndBootstrap(); // retry bootstrap without redirect this time
767773
}
768774
DatabaseBoardInfoResponse = MakeRequestStateStorageEndpointsLookup(SharedDatabase);
769775
} else {
@@ -795,7 +801,8 @@ void TViewerPipeClient::HandleResolve(TEvStateStorage::TEvBoardInfo::TPtr& ev) {
795801
if (DatabaseBoardInfoResponse->IsOk()) {
796802
ReplyAndPassAway(MakeForward(GetNodesFromBoardReply(DatabaseBoardInfoResponse->GetRef())));
797803
} else {
798-
ReplyAndPassAway(GetHTTPBADREQUEST("text/plain", "Failed to resolve database - no nodes found"));
804+
Direct = true;
805+
ResetAndBootstrap(); // retry bootstrap without redirect this time
799806
}
800807
}
801808
}

ydb/core/viewer/json_pipe_req.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,7 @@ class TViewerPipeClient : public TActorBootstrapped<TViewerPipeClient> {
303303
TString MakeForward(const std::vector<ui32>& nodes);
304304

305305
void RequestDone(ui32 requests = 1);
306+
void ResetAndBootstrap();
306307
void AddEvent(const TString& name);
307308
void Handle(TEvTabletPipe::TEvClientConnected::TPtr& ev);
308309
void HandleResolveDatabase(TEvTxProxySchemeCache::TEvNavigateKeySetResult::TPtr& ev);

0 commit comments

Comments
 (0)