@@ -120,10 +120,10 @@ class TModificationActorImpl: public NActors::TActorBootstrapped<TModificationAc
120120 InitState ();
121121 if (!Patches.size ()) {
122122 ExternalController->OnAlteringProblem (" no patches" );
123- return TBase:: PassAway ();
123+ return this -> PassAway ();
124124 }
125125 if (!BuildRestoreObjectIds ()) {
126- return TBase:: PassAway ();
126+ return this -> PassAway ();
127127 }
128128
129129 TBase::Register (new NRequest::TYDBCallbackRequest<NRequest::TDialogCreateSession>(
@@ -146,7 +146,7 @@ class TModificationActorImpl: public NActors::TActorBootstrapped<TModificationAc
146146 Y_ABORT_UNLESS (TransactionId);
147147 std::vector<TObject> objects = std::move (ev->Get ()->MutableObjects ());
148148 if (!PrepareRestoredObjects (objects)) {
149- TBase:: PassAway ();
149+ this -> PassAway ();
150150 } else {
151151 Manager->PrepareObjectsBeforeModification (std::move (objects), InternalController, Context);
152152 }
@@ -159,12 +159,12 @@ class TModificationActorImpl: public NActors::TActorBootstrapped<TModificationAc
159159 for (auto && i : ev->Get ()->GetObjects ()) {
160160 if (!records.AddRecordNativeValues (i.SerializeToRecord ())) {
161161 ExternalController->OnAlteringProblem (" unexpected serialization inconsistency" );
162- return TBase:: PassAway ();
162+ return this -> PassAway ();
163163 }
164164 }
165165 if (!ProcessPreparedObjects (std::move (records))) {
166166 ExternalController->OnAlteringProblem (" cannot process prepared objects" );
167- return TBase:: PassAway ();
167+ return this -> PassAway ();
168168 }
169169 }
170170
@@ -183,6 +183,15 @@ class TModificationActorImpl: public NActors::TActorBootstrapped<TModificationAc
183183 ExternalController->OnAlteringProblem (" cannot restore objects: " + ev->Get ()->GetErrorMessage ());
184184 }
185185
186+ void PassAway () override {
187+ if (SessionId) {
188+ NMetadata::NRequest::TDialogDeleteSession::TRequest deleteRequest;
189+ deleteRequest.set_session_id (SessionId);
190+ TBase::Register (new NRequest::TYDBCallbackRequest<NRequest::TDialogDeleteSession>(deleteRequest, UserToken, TBase::SelfId ()));
191+ }
192+
193+ TBase::PassAway ();
194+ }
186195};
187196
188197template <class TObject >
0 commit comments