@@ -554,31 +554,31 @@ void TWriteSessionImpl::TrySubscribeOnTransactionCommit(TTransactionBase* tx)
554554 txInfo->IsActive = true ;
555555 txInfo->Subscribed = true ;
556556 txInfo->AllAcksReceived = NThreading::NewPromise<TStatus>();
557- }
558557
559- auto callback = [cbContext = this ->SelfContext , txId, txInfo]() {
560- with_lock (txInfo->Lock ) {
561- Y_ABORT_UNLESS (!txInfo->CommitCalled );
558+ auto callback = [cbContext = this ->SelfContext , txId, txInfo]() {
559+ with_lock (txInfo->Lock ) {
560+ Y_ABORT_UNLESS (!txInfo->CommitCalled );
562561
563- txInfo->CommitCalled = true ;
562+ txInfo->CommitCalled = true ;
564563
565- if (txInfo->WriteCount == txInfo->AckCount ) {
566- txInfo->AllAcksReceived .SetValue (MakeCommitTransactionSuccess ());
567- if (auto self = cbContext->LockShared ()) {
568- self->DeleteTx (txId);
564+ if (txInfo->WriteCount == txInfo->AckCount ) {
565+ txInfo->AllAcksReceived .SetValue (MakeCommitTransactionSuccess ());
566+ if (auto self = cbContext->LockShared ()) {
567+ self->DeleteTx (txId);
568+ }
569+ return txInfo->AllAcksReceived .GetFuture ();
569570 }
570- return txInfo->AllAcksReceived .GetFuture ();
571- }
572571
573- if (txInfo->IsActive ) {
574- return txInfo->AllAcksReceived .GetFuture ();
572+ if (txInfo->IsActive ) {
573+ return txInfo->AllAcksReceived .GetFuture ();
574+ }
575575 }
576- }
577576
578- return NThreading::MakeFuture (MakeSessionExpiredError ());
579- };
577+ return NThreading::MakeFuture (MakeSessionExpiredError ());
578+ };
580579
581- tx->AddPrecommitCallback (std::move (callback));
580+ tx->AddPrecommitCallback (std::move (callback));
581+ }
582582}
583583
584584void TWriteSessionImpl::TrySignalAllAcksReceived (ui64 seqNo)
0 commit comments