Skip to content

Commit

Permalink
[fix](move-memtable) fix streams for node memory leak in sink v2 (#29146
Browse files Browse the repository at this point in the history
)
  • Loading branch information
kaijchen authored Dec 27, 2023
1 parent d96278a commit 0cc4ee5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion be/src/vec/sink/writer/vtablet_writer_v2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,7 @@ Status VTabletWriterV2::close(Status exec_status) {
for (const auto& [_, streams] : _streams_for_node) {
streams->release();
}
_streams_for_node.clear();
});

{
Expand Down Expand Up @@ -541,7 +542,6 @@ Status VTabletWriterV2::close(Status exec_status) {
_state->tablet_commit_infos().insert(_state->tablet_commit_infos().end(),
std::make_move_iterator(tablet_commit_infos.begin()),
std::make_move_iterator(tablet_commit_infos.end()));
_streams_for_node.clear();

// _number_input_rows don't contain num_rows_load_filtered and num_rows_load_unselected in scan node
int64_t num_rows_load_total = _number_input_rows + _state->num_rows_load_filtered() +
Expand Down

0 comments on commit 0cc4ee5

Please sign in to comment.