Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replaced client cache to server cache in ydb tools restore command #9031

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions ydb/library/backup/query_uploader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,20 +102,13 @@ bool TUploader::Push(TParams params) {
}

auto upload = [this, params] (NYdb::NTable::TSession session) -> NYdb::TStatus {
auto prepareSettings = NTable::TPrepareDataQuerySettings()
.RequestType(DOC_API_REQUEST_TYPE);
auto prepareResult = session.PrepareDataQuery(Query, prepareSettings).GetValueSync();
if (!prepareResult.IsSuccess()) {
return prepareResult;
}

auto dataQuery = prepareResult.GetQuery();
auto transaction = NYdb::NTable::TTxControl::BeginTx(NYdb::NTable::TTxSettings::SerializableRW()).CommitTx();
auto settings = NTable::TExecDataQuerySettings()
.KeepInQueryCache(true)
.RequestType(DOC_API_REQUEST_TYPE)
.OperationTimeout(TDuration::Seconds(100))
.ClientTimeout(TDuration::Seconds(120));
return dataQuery.Execute(transaction, std::move(params), settings).GetValueSync();
return session.ExecuteDataQuery(Query, transaction, std::move(params), settings).GetValueSync();
};

auto task = [this, upload] () {
Expand Down