File tree Expand file tree Collapse file tree
src/Storages/ObjectStorage/DataLakes/Iceberg Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1492,7 +1492,7 @@ bool IcebergMetadata::commitImportPartitionTransactionImpl(
14921492
14931493 String manifest_entry_name;
14941494 String storage_manifest_entry_name;
1495- Int32 manifest_lengths = 0 ;
1495+ Int64 manifest_lengths = 0 ;
14961496
14971497 // / Tracks whether the snapshot has become visible to readers.
14981498 // / For the file-based layout that happens as soon as writeMetadataFileAndVersionHint
Original file line number Diff line number Diff line change @@ -1374,6 +1374,11 @@ IcebergImportSink::IcebergImportSink(
13741374 new_file_path_callback);
13751375}
13761376
1377+ IcebergImportSink::~IcebergImportSink ()
1378+ {
1379+ cancelBuffers ();
1380+ }
1381+
13771382void IcebergImportSink::consume (Chunk & chunk)
13781383{
13791384 if (isCancelled ())
@@ -1385,7 +1390,10 @@ void IcebergImportSink::consume(Chunk & chunk)
13851390void IcebergImportSink::onFinish ()
13861391{
13871392 if (isCancelled ())
1393+ {
1394+ cancelBuffers ();
13881395 return ;
1396+ }
13891397
13901398 finalizeBuffers ();
13911399
@@ -1408,6 +1416,11 @@ void IcebergImportSink::onFinish()
14081416 releaseBuffers ();
14091417}
14101418
1419+ void IcebergImportSink::onException (std::exception_ptr /* exception */ )
1420+ {
1421+ cancelBuffers ();
1422+ }
1423+
14111424void IcebergImportSink::finalizeBuffers ()
14121425{
14131426 writer->finalize ();
Original file line number Diff line number Diff line change @@ -182,13 +182,14 @@ class IcebergImportSink : public SinkToStorage
182182 const DataLakeStorageSettings & data_lake_settings_,
183183 std::function<void (const std::string &)> new_file_path_callback_ = {});
184184
185- ~IcebergImportSink () override = default ;
185+ ~IcebergImportSink () override ;
186186
187187 String getName () const override { return " IcebergImportSink" ; }
188188
189189 void consume (Chunk & chunk) override ;
190190
191191 void onFinish () override ;
192+ void onException (std::exception_ptr exception) override ;
192193
193194private:
194195 void finalizeBuffers ();
You can’t perform that action at this time.
0 commit comments