Skip to content

Commit

Permalink
[fix](move-memtable) check load timeout before close wait (apache#30526)
Browse files Browse the repository at this point in the history
  • Loading branch information
kaijchen authored Jan 30, 2024
1 parent 6e3458b commit d848c81
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions be/src/vec/sink/writer/vtablet_writer_v2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,11 @@ Status VTabletWriterV2::close(Status exec_status) {
SCOPED_TIMER(_close_load_timer);
auto remain_ms = _state->execution_timeout() * 1000 -
_timeout_watch.elapsed_time() / 1000 / 1000;
if (remain_ms <= 0) {
LOG(WARNING) << "load timed out before close waiting, load_id="
<< print_id(_load_id);
return Status::TimedOut("load timed out before close waiting");
}
for (const auto& [_, streams] : _streams_for_node) {
for (const auto& stream : streams->streams()) {
RETURN_IF_ERROR(stream->close_wait(remain_ms));
Expand Down

0 comments on commit d848c81

Please sign in to comment.