Skip to content

Commit

Permalink
row_cache: cache_flat_mutation_reader: close underlying readers
Browse files Browse the repository at this point in the history
Signed-off-by: Benny Halevy <[email protected]>
  • Loading branch information
bhalevy committed Apr 25, 2021
1 parent 0a2670c commit 13dfc41
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cache_flat_mutation_reader.hh
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,11 @@ public:
virtual future<> fast_forward_to(position_range pr, db::timeout_clock::time_point timeout) override {
return make_exception_future<>(make_backtraced_exception_ptr<std::bad_function_call>());
}
virtual future<> close() noexcept {
auto close_read_context = _read_context_holder ? _read_context_holder->close() : make_ready_future<>();
auto close_underlying = _underlying_holder ? _underlying_holder->close() : make_ready_future<>();
return when_all_succeed(std::move(close_read_context), std::move(close_underlying)).discard_result();
}
};

inline
Expand Down

0 comments on commit 13dfc41

Please sign in to comment.