Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanmorozov333 committed May 15, 2024
1 parent cfcaf47 commit bbb9214
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,8 @@ NKikimr::TConclusion<std::unique_ptr<NTabletFlatExecutor::ITransaction>> TDestin
}

NKikimr::TConclusion<std::unique_ptr<NTabletFlatExecutor::ITransaction>> TDestinationSession::ReceiveFinished(NColumnShard::TColumnShard* self, const TTabletId sourceTabletId, const std::shared_ptr<TDestinationSession>& selfPtr) {
auto result = GetCursorVerified(sourceTabletId).ReceiveFinished();
if (!result) {
return result;
if (GetCursorVerified(sourceTabletId).GetDataFinished()) {
return TConclusionStatus::Fail("session finished already");
}
return std::unique_ptr<NTabletFlatExecutor::ITransaction>(new TTxFinishFromSource(self, sourceTabletId, selfPtr));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ bool TTxFinishFromSource::DoExecute(NTabletFlatExecutor::TTransactionContext& tx
NIceDb::TNiceDb db(txc.DB);
db.Table<Schema::DestinationSessions>().Key(Session->GetSessionId())
.Update(NIceDb::TUpdate<Schema::DestinationSessions::Cursor>(Session->SerializeCursorToProto().SerializeAsString()));
if (Session->GetSourcesInProgressCount() == 1) {
if (Session->GetSourcesInProgressCount() == 0) {
Finished = true;
if (Session->GetTransferContext().GetTxId()) {
Self->GetProgressTxController().FinishProposeOnExecute(*Session->GetTransferContext().GetTxId(), txc);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class TTxFinishFromSource: public TExtendedTransactionBase<NColumnShard::TColumn
, Session(session)
, SourceTabletId(sourceTabletId)
{
Session->GetCursorVerified(SourceTabletId).ReceiveFinished().Validate();
}

TTxType GetTxType() const override { return NColumnShard::TXTYPE_DATA_SHARING_FINISH_FROM_SOURCE; }
Expand Down

0 comments on commit bbb9214

Please sign in to comment.