Skip to content

Commit

Permalink
fix race in SparkMergeTreeWriter::finalizeMerge
Browse files Browse the repository at this point in the history
  • Loading branch information
baibaichen committed Aug 22, 2024
1 parent ba54da6 commit 4a613f7
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -265,11 +265,11 @@ void SparkMergeTreeWriter::finalizeMerge()
continue;

GlobalThreadPool::instance().scheduleOrThrow(
[&]() -> void
[storage_ = storage, tmp = tmp_part]() -> void
{
for (const auto & disk : storage->getDisks())
for (const auto & disk : storage_->getDisks())
{
auto rel_path = storage->getRelativeDataPath() + "/" + tmp_part;
auto rel_path = storage_->getRelativeDataPath() + "/" + tmp;
disk->removeRecursive(rel_path);
}
});
Expand Down

0 comments on commit 4a613f7

Please sign in to comment.