File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -44,8 +44,6 @@ MergeTreeSink::~MergeTreeSink()
4444 if (!delayed_chunk)
4545 return ;
4646
47- chassert (isCancelled ());
48-
4947 for (auto & partition : delayed_chunk->partitions )
5048 {
5149 partition.temp_part .cancel ();
Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ struct MergedBlockOutputStream::Finalizer::Impl
118118 }
119119
120120 void finish ();
121- void cancel () noexcept ;
121+ void cancel ();
122122};
123123
124124void MergedBlockOutputStream::Finalizer::finish ()
@@ -129,7 +129,7 @@ void MergedBlockOutputStream::Finalizer::finish()
129129 to_finish->finish ();
130130}
131131
132- void MergedBlockOutputStream::Finalizer::cancel () noexcept
132+ void MergedBlockOutputStream::Finalizer::cancel ()
133133{
134134 std::unique_ptr<Impl> to_cancel = std::move (impl);
135135 impl.reset ();
@@ -166,7 +166,7 @@ void MergedBlockOutputStream::Finalizer::Impl::finish()
166166 part->getDataPartStorage ().removeFile (file_name);
167167}
168168
169- void MergedBlockOutputStream::Finalizer::Impl::cancel () noexcept
169+ void MergedBlockOutputStream::Finalizer::Impl::cancel ()
170170{
171171 writer.cancel ();
172172
@@ -182,8 +182,15 @@ MergedBlockOutputStream::Finalizer::Finalizer(std::unique_ptr<Impl> impl_) : imp
182182
183183MergedBlockOutputStream::Finalizer::~Finalizer ()
184184{
185- if (impl)
186- cancel ();
185+ try
186+ {
187+ if (impl)
188+ finish ();
189+ }
190+ catch (...)
191+ {
192+ tryLogCurrentException (__PRETTY_FUNCTION__);
193+ }
187194}
188195
189196
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ class MergedBlockOutputStream final : public IMergedBlockOutputStream
5454 ~Finalizer ();
5555
5656 void finish ();
57- void cancel () noexcept ;
57+ void cancel ();
5858 };
5959
6060 // / Finalize writing part and fill inner structures
You can’t perform that action at this time.
0 commit comments