Skip to content

Commit 67cf548

Browse files
committed
Follow up
1 parent 6e3079d commit 67cf548

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

cpp/velox/memory/GlutenDirectBufferedInput.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ class GlutenDirectBufferedInput : public facebook::velox::dwio::common::DirectBu
4848

4949
~GlutenDirectBufferedInput() override {
5050
requests_.clear();
51+
for (auto& load : coalescedLoads_) {
52+
if (load->state() == facebook::velox::cache::CoalescedLoad::State::kPlanned) {
53+
load->cancel();
54+
}
55+
}
5156
for (auto& load : coalescedLoads_) {
5257
if (load->state() == facebook::velox::cache::CoalescedLoad::State::kLoading) {
5358
folly::SemiFuture<bool> waitFuture(false);
@@ -56,7 +61,6 @@ class GlutenDirectBufferedInput : public facebook::velox::dwio::common::DirectBu
5661
std::move(waitFuture).via(&exec).wait();
5762
}
5863
}
59-
load->cancel();
6064
}
6165
coalescedLoads_.clear();
6266
}

0 commit comments

Comments
 (0)