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

[fix](load) fix merged row number miscounting because of race condition #26470

Merged
merged 1 commit into from
Nov 6, 2023
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
2 changes: 1 addition & 1 deletion be/src/olap/delta_writer.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ class DeltaWriter {
std::shared_mutex _slave_node_lock;

// total rows num written by DeltaWriter
int64_t _total_received_rows = 0;
std::atomic<int64_t> _total_received_rows = 0;

RuntimeProfile* _profile = nullptr;
RuntimeProfile::Counter* _close_wait_timer = nullptr;
Expand Down
8 changes: 4 additions & 4 deletions be/src/olap/memtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -155,14 +155,14 @@ class MemTableStat {
return *this;
}

int64_t raw_rows = 0;
int64_t merged_rows = 0;
std::atomic<int64_t> raw_rows = 0;
std::atomic<int64_t> merged_rows = 0;
int64_t sort_ns = 0;
int64_t agg_ns = 0;
int64_t put_into_output_ns = 0;
int64_t duration_ns = 0;
int64_t sort_times = 0;
int64_t agg_times = 0;
std::atomic<int64_t> sort_times = 0;
std::atomic<int64_t> agg_times = 0;
};

class MemTable {
Expand Down