diff options
author | Alexey Ozeritskiy <aozeritsky@gmail.com> | 2022-06-06 15:39:10 +0300 |
---|---|---|
committer | Alexey Ozeritskiy <aozeritsky@gmail.com> | 2022-06-06 15:39:10 +0300 |
commit | 780b50fea3c9c5351006caf0cfc9b69744702f0b (patch) | |
tree | eaf792e825435f89cacf5c6498857548b8638131 | |
parent | e5e0e3e814cf0b04b0205a612df8a2bcb4086caa (diff) | |
download | ydb-780b50fea3c9c5351006caf0cfc9b69744702f0b.tar.gz |
YQ-1095: Cleanup channels (and all unboxedvalues) on terminate
ref:f5c5e87f1a4035da4b5d822fe662cc8d1d095351
-rw-r--r-- | ydb/library/yql/dq/actors/compute/dq_compute_actor_impl.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/ydb/library/yql/dq/actors/compute/dq_compute_actor_impl.h b/ydb/library/yql/dq/actors/compute/dq_compute_actor_impl.h index 13d4b041f05..e3157ea5174 100644 --- a/ydb/library/yql/dq/actors/compute/dq_compute_actor_impl.h +++ b/ydb/library/yql/dq/actors/compute/dq_compute_actor_impl.h @@ -470,6 +470,19 @@ protected: RuntimeSettings.TerminateHandler(success, issues); } + { + // free MKQL memory then destroy TaskRunner and Allocator + auto guard = BindAllocator(); +#define CLEANUP(what) decltype(what) what##_; what.swap(what##_); + CLEANUP(InputChannelsMap); + CLEANUP(SourcesMap); + CLEANUP(InputTransformsMap); + CLEANUP(OutputChannelsMap); + CLEANUP(SinksMap); + CLEANUP(OutputTransformsMap); +#undef CLEANUP + } + this->PassAway(); MemoryQuota = nullptr; } |