Skip to content

Commit c754c64

Browse files
authored
Replaced client cache to server cache in ydb tools restore command (#9031)
1 parent b717948 commit c754c64

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

ydb/library/backup/query_uploader.cpp

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -102,20 +102,13 @@ bool TUploader::Push(TParams params) {
102102
}
103103

104104
auto upload = [this, params] (NYdb::NTable::TSession session) -> NYdb::TStatus {
105-
auto prepareSettings = NTable::TPrepareDataQuerySettings()
106-
.RequestType(DOC_API_REQUEST_TYPE);
107-
auto prepareResult = session.PrepareDataQuery(Query, prepareSettings).GetValueSync();
108-
if (!prepareResult.IsSuccess()) {
109-
return prepareResult;
110-
}
111-
112-
auto dataQuery = prepareResult.GetQuery();
113105
auto transaction = NYdb::NTable::TTxControl::BeginTx(NYdb::NTable::TTxSettings::SerializableRW()).CommitTx();
114106
auto settings = NTable::TExecDataQuerySettings()
107+
.KeepInQueryCache(true)
115108
.RequestType(DOC_API_REQUEST_TYPE)
116109
.OperationTimeout(TDuration::Seconds(100))
117110
.ClientTimeout(TDuration::Seconds(120));
118-
return dataQuery.Execute(transaction, std::move(params), settings).GetValueSync();
111+
return session.ExecuteDataQuery(Query, transaction, std::move(params), settings).GetValueSync();
119112
};
120113

121114
auto task = [this, upload] () {

0 commit comments

Comments
 (0)