Skip to content

Commit d01eb15

Browse files
committed
Fix iterator locking
1 parent 4edabba commit d01eb15

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,8 +319,10 @@ IcebergIterator::IcebergIterator(
319319
std::sort(equality_deletes_files.begin(), equality_deletes_files.end());
320320
std::sort(position_deletes_files.begin(), position_deletes_files.end());
321321
producer_task.emplace(
322-
[this]()
322+
[this, thread_group = DB::CurrentThread::getGroup()]()
323323
{
324+
ThreadGroupSwitcher switcher(thread_group, "IcebergKeysIterator");
325+
324326
while (!blocking_queue.isFinished())
325327
{
326328
std::optional<ManifestFileEntry> entry;

src/Storages/ObjectStorage/IObjectIterator.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ class ObjectIteratorWithPathAndFileFilter : public IObjectIterator, private With
4141
size_t estimatedKeysCount() override { return iterator->estimatedKeysCount(); }
4242
std::optional<UInt64> getSnapshotVersion() const override { return iterator->getSnapshotVersion(); }
4343

44+
bool has_concurrent_next() const override { return iterator->has_concurrent_next(); }
45+
4446
private:
4547
const ObjectIterator iterator;
4648
const std::string object_namespace;
@@ -62,6 +64,8 @@ class ObjectIteratorSplitByBuckets : public IObjectIterator, private WithContext
6264
size_t estimatedKeysCount() override { return iterator->estimatedKeysCount(); }
6365
std::optional<UInt64> getSnapshotVersion() const override { return iterator->getSnapshotVersion(); }
6466

67+
bool has_concurrent_next() const override { return iterator->has_concurrent_next(); }
68+
6569
private:
6670
const ObjectIterator iterator;
6771
String format;

0 commit comments

Comments
 (0)