Skip to content

Commit 0834da1

Browse files
author
shamirchen
committed
wait only when state is loading
1 parent 29d86d9 commit 0834da1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

velox/dwio/common/DirectBufferedInput.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ class DirectCoalescedLoad : public cache::CoalescedLoad {
103103

104104
void cancel() override {
105105
folly::SemiFuture<bool> waitFuture(false);
106-
if (!loadOrFuture(&waitFuture)) {
106+
if (state() == State::kLoading && !loadOrFuture(&waitFuture)) {
107107
waitFuture.wait();
108108
}
109109
for (auto& request : requests_) {

0 commit comments

Comments
 (0)