Skip to content

Commit 98a6515

Browse files
authored
Don't crash on file absence (#9112)
1 parent 658b27b commit 98a6515

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

ydb/library/yql/providers/dq/global_worker_manager/global_worker_manager.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ class TGlobalWorkerManager: public TWorkerManagerCommon<TGlobalWorkerManager> {
456456
return std::make_pair(true, "");
457457
}
458458

459-
std::pair<bool, TString> MaybeUpload(bool isForwarded, const TVector<TFileResource>& files, bool useCache = false) {
459+
std::pair<bool, TString> MaybeUploadUnsafe(bool isForwarded, const TVector<TFileResource>& files, bool useCache = false) {
460460
if (isForwarded) {
461461
return std::make_pair(false, "");
462462
}
@@ -557,6 +557,15 @@ class TGlobalWorkerManager: public TWorkerManagerCommon<TGlobalWorkerManager> {
557557
return std::make_pair(flag, "");
558558
}
559559

560+
std::pair<bool, TString> MaybeUpload(bool isForwarded, const TVector<TFileResource>& files, bool useCache = false) {
561+
try {
562+
return MaybeUploadUnsafe(isForwarded, files, useCache);
563+
} catch (...) {
564+
return {false, CurrentExceptionMessage()};
565+
}
566+
}
567+
568+
560569
void StartUploadAndForward(TEvAllocateWorkersRequest::TPtr& ev, const TActorContext& ctx)
561570
{
562571
YQL_LOG_CTX_ROOT_SESSION_SCOPE(ev->Get()->Record.GetTraceId());

0 commit comments

Comments
 (0)