Skip to content

Commit 4b9bcc1

Browse files
committed
some small adaptations
1 parent 8eed524 commit 4b9bcc1

3 files changed

Lines changed: 16 additions & 2 deletions

File tree

src/Storages/ObjectStorage/DataLakes/Iceberg/IcebergMetadata.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

src/Storages/ObjectStorage/DataLakes/Iceberg/IcebergWrites.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1374,6 +1374,11 @@ IcebergImportSink::IcebergImportSink(
13741374
new_file_path_callback);
13751375
}
13761376

1377+
IcebergImportSink::~IcebergImportSink()
1378+
{
1379+
cancelBuffers();
1380+
}
1381+
13771382
void IcebergImportSink::consume(Chunk & chunk)
13781383
{
13791384
if (isCancelled())
@@ -1385,7 +1390,10 @@ void IcebergImportSink::consume(Chunk & chunk)
13851390
void 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+
14111424
void IcebergImportSink::finalizeBuffers()
14121425
{
14131426
writer->finalize();

src/Storages/ObjectStorage/DataLakes/Iceberg/IcebergWrites.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff 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

193194
private:
194195
void finalizeBuffers();

0 commit comments

Comments
 (0)