Skip to content

Commit

Permalink
Fix saving progress if batch was not uploaded (ydb-platform#14537)
Browse files Browse the repository at this point in the history
  • Loading branch information
pnv1 authored Feb 13, 2025
1 parent f578a18 commit 54f9570
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions ydb/apps/ydb/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
* Fixed a bug where `ydb auth get-token` command tried to authenticate twice: while listing andpoints and while executing actual token request.
* Fixed a bug where `ydb import file csv` command was saving progress even if a batch upload had been failed.
* 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.
* Fixed a bug where some errors could be ignored when restoring from a local backup.
* Added `ydb workload log import generator` command.
Expand Down
10 changes: 6 additions & 4 deletions ydb/public/lib/ydb_cli/import/import.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1005,10 +1005,12 @@ TStatus TImportFileClient::TImpl::UpsertCsv(IInputStream& input,
UpsertTValueBuffer(dbPath, std::move(buildFunc))
.Apply([&, batchStatus](const TAsyncStatus& asyncStatus) {
jobInflightManager->ReleaseJob();
batchStatus->Completed = true;
if (!FileProgressPool->AddFunc(saveProgressIfAny) && !Failed.exchange(true)) {
ErrorStatus = MakeHolder<TStatus>(MakeStatus(EStatus::INTERNAL_ERROR,
"Couldn't add worker func to save progress"));
if (asyncStatus.GetValueSync().IsSuccess()) {
batchStatus->Completed = true;
if (!FileProgressPool->AddFunc(saveProgressIfAny) && !Failed.exchange(true)) {
ErrorStatus = MakeHolder<TStatus>(MakeStatus(EStatus::INTERNAL_ERROR,
"Couldn't add worker func to save progress"));
}
}
return asyncStatus;
});
Expand Down

0 comments on commit 54f9570

Please sign in to comment.