Skip to content

Commit 54f9570

Browse files
authored
Fix saving progress if batch was not uploaded (#14537)
1 parent f578a18 commit 54f9570

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

ydb/apps/ydb/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
* Fixed a bug where `ydb auth get-token` command tried to authenticate twice: while listing andpoints and while executing actual token request.
2+
* Fixed a bug where `ydb import file csv` command was saving progress even if a batch upload had been failed.
23
* Include coordination nodes in local backups (`ydb tools dump` and `ydb tools restore`). Rate limiters that utilize the coordination node are saved in the coordination node's backup folder, preserving the existing path hierarchy.
34
* Fixed a bug where some errors could be ignored when restoring from a local backup.
45
* Added `ydb workload log import generator` command.

ydb/public/lib/ydb_cli/import/import.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1005,10 +1005,12 @@ TStatus TImportFileClient::TImpl::UpsertCsv(IInputStream& input,
10051005
UpsertTValueBuffer(dbPath, std::move(buildFunc))
10061006
.Apply([&, batchStatus](const TAsyncStatus& asyncStatus) {
10071007
jobInflightManager->ReleaseJob();
1008-
batchStatus->Completed = true;
1009-
if (!FileProgressPool->AddFunc(saveProgressIfAny) && !Failed.exchange(true)) {
1010-
ErrorStatus = MakeHolder<TStatus>(MakeStatus(EStatus::INTERNAL_ERROR,
1011-
"Couldn't add worker func to save progress"));
1008+
if (asyncStatus.GetValueSync().IsSuccess()) {
1009+
batchStatus->Completed = true;
1010+
if (!FileProgressPool->AddFunc(saveProgressIfAny) && !Failed.exchange(true)) {
1011+
ErrorStatus = MakeHolder<TStatus>(MakeStatus(EStatus::INTERNAL_ERROR,
1012+
"Couldn't add worker func to save progress"));
1013+
}
10121014
}
10131015
return asyncStatus;
10141016
});

0 commit comments

Comments
 (0)