Skip to content

Commit

Permalink
Replaced client cache to server cache in ydb tools restore command (y…
Browse files Browse the repository at this point in the history
  • Loading branch information
Gazizonoki authored Sep 10, 2024
1 parent b717948 commit c754c64
Showing 1 changed file with 2 additions and 9 deletions.
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

0 comments on commit c754c64

Please sign in to comment.