Skip to content

Commit

Permalink
export: review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jepett0 committed Jan 24, 2025
1 parent 08862d4 commit eb25e5a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
16 changes: 10 additions & 6 deletions ydb/core/tx/schemeshard/schemeshard_export__create.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@
#include <util/generic/xrange.h>
#include <util/string/builder.h>

namespace {

ui32 PopFront(TDeque<ui32>& pendingItems) {
const ui32 itemIdx = pendingItems.front();
pendingItems.pop_front();
return itemIdx;
}

}

namespace NKikimr {
namespace NSchemeShard {

Expand Down Expand Up @@ -684,12 +694,6 @@ struct TSchemeShard::TExport::TTxProgress: public TSchemeShard::TXxport::TTxBase
}
}

ui32 PopFront(TDeque<ui32>& pendingItems) {
const ui32 itemIdx = pendingItems.front();
pendingItems.pop_front();
return itemIdx;
}

void EndExport(TExportInfo::TPtr exportInfo, EState finalState, NIceDb::TNiceDb& db) {
exportInfo->State = finalState;
exportInfo->EndTime = TAppData::TimeProvider->Now();
Expand Down
5 changes: 0 additions & 5 deletions ydb/core/tx/schemeshard/schemeshard_export__forget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ struct TSchemeShard::TExport::TTxForget: public TSchemeShard::TXxport::TTxBase {
exportInfo->State = TExportInfo::EState::Dropping;
Self->PersistExportState(db, exportInfo);

TVector<ui32> itemsToDrop;
for (ui32 itemIdx : xrange(exportInfo->Items.size())) {
auto& item = exportInfo->Items.at(itemIdx);

Expand All @@ -91,14 +90,10 @@ struct TSchemeShard::TExport::TTxForget: public TSchemeShard::TXxport::TTxBase {
const TPath itemPath = TPath::Resolve(ExportItemPathName(Self, exportInfo, itemIdx), Self);
if (itemPath.IsResolved() && !itemPath.IsDeleted()) {
item.State = TExportInfo::EState::Dropping;
itemsToDrop.emplace_back(itemIdx);
}

Self->PersistExportItemState(db, exportInfo, itemIdx);
}
LOG_T("TExport::TTxForget, items to drop"
<< ", items: " << JoinSeq(", ", itemsToDrop)
);

Progress = true;
}
Expand Down

0 comments on commit eb25e5a

Please sign in to comment.