Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

branch-3.0: [fix](move-memtable) immediately return error when close wait failed #44344 #44386

Merged
merged 1 commit into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions be/src/vec/sink/writer/vtablet_writer_v2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ Status VTabletWriterV2::close(Status exec_status) {
// close_wait on all non-incremental streams, even if this is not the last sink.
// because some per-instance data structures are now shared among all sinks
// due to sharing delta writers and load stream stubs.
_close_wait(false);
RETURN_IF_ERROR(_close_wait(false));

// send CLOSE_LOAD on all incremental streams if this is the last sink.
// this must happen after all non-incremental streams are closed,
Expand All @@ -616,7 +616,7 @@ Status VTabletWriterV2::close(Status exec_status) {
}

// close_wait on all incremental streams, even if this is not the last sink.
_close_wait(true);
RETURN_IF_ERROR(_close_wait(true));

// calculate and submit commit info
if (is_last_sink) {
Expand Down Expand Up @@ -665,7 +665,7 @@ Status VTabletWriterV2::close(Status exec_status) {
return status;
}

void VTabletWriterV2::_close_wait(bool incremental) {
Status VTabletWriterV2::_close_wait(bool incremental) {
SCOPED_TIMER(_close_load_timer);
auto st = _load_stream_map->for_each_st(
[this, incremental](int64_t dst_id, LoadStreamStubs& streams) -> Status {
Expand All @@ -690,6 +690,7 @@ void VTabletWriterV2::_close_wait(bool incremental) {
if (!st.ok()) {
LOG(WARNING) << "close_wait failed: " << st << ", load_id=" << print_id(_load_id);
}
return st;
}

void VTabletWriterV2::_calc_tablets_to_commit() {
Expand Down
2 changes: 1 addition & 1 deletion be/src/vec/sink/writer/vtablet_writer_v2.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ class VTabletWriterV2 final : public AsyncResultWriter {

void _calc_tablets_to_commit();

void _close_wait(bool incremental);
Status _close_wait(bool incremental);

void _cancel(Status status);

Expand Down
Loading