Skip to content

Commit

Permalink
more replay fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
vitstn committed Oct 22, 2024
1 parent f42f958 commit dba48ce
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
5 changes: 5 additions & 0 deletions ydb/library/yql/core/facade/yql_facade.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,11 @@ TProgram::TProgram(
QContext_.GetWriter()->Put({FacadeComponent, StaticCredentialsLabel}, credList).GetValueSync();
} else if (QContext_.CanRead()) {
Credentials_ = MakeIntrusive<TCredentials>();
Credentials_->SetUserCredentials({
.OauthToken = "REPLAY_OAUTH",
.BlackboxSessionIdCookie = "REPLAY_SESSIONID"
});

for (const auto& label : {StaticCredentialsLabel, DynamicCredentialsLabel}) {
auto item = QContext_.GetReader()->Get({FacadeComponent, label}).GetValueSync();
if (item) {
Expand Down
7 changes: 5 additions & 2 deletions ydb/library/yql/providers/common/provider/yql_provider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1155,12 +1155,15 @@ std::pair<IGraphTransformer::TStatus, TAsyncTransformCallbackFuture> FreezeUsedF
return SyncError();
}

if (types.QContext.CanRead()) {
return SyncOk();
}

auto future = FreezeUserDataTableIfNeeded(types.UserDataStorage, files, urlDownloadFilter);
if (future.Wait(TDuration::Zero())) {
files = future.GetValue()();
return SyncOk();
}
else {
} else {
return std::make_pair(IGraphTransformer::TStatus::Async, future.Apply(
[](const NThreading::TFuture<std::function<TUserDataTable()>>& completedFuture) {
return TAsyncTransformCallback([completedFuture](const TExprNode::TPtr& input, TExprNode::TPtr& output, TExprContext& ctx) {
Expand Down

0 comments on commit dba48ce

Please sign in to comment.