Skip to content

Commit

Permalink
edit
Browse files Browse the repository at this point in the history
  • Loading branch information
hust-hhb committed Apr 1, 2024
1 parent d9e34eb commit 66ba0de
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
11 changes: 11 additions & 0 deletions be/src/vec/sink/writer/vtablet_writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1493,11 +1493,22 @@ Status VTabletWriter::close(Status exec_status) {
// Due to the non-determinism of compaction, the rowsets of each replica may be different from each other on different
// BE nodes. The number of rows filtered in SegmentWriter depends on the historical rowsets located in the correspoding
// BE node. So we check the number of rows filtered on each succeccful BE to ensure the consistency of the current load
LOG(INFO) << "status.ok():" << status.ok()
<< ",_write_single_replica:" << _write_single_replica
<< ",_schema->is_strict_mode():" << _schema->is_strict_mode()
<< ",_schema->is_partial_update():" << _schema->is_partial_update()
<< ",_schema:" << _schema->debug_string()
<< "table id:" << _schema->table_id() << "db_id:" << _schema->db_id();
if (status.ok() && !_write_single_replica && _schema->is_strict_mode() &&
_schema->is_partial_update()) {
if (Status st = index_channel->check_tablet_filtered_rows_consistency(); !st.ok()) {
status = st;
} else {
if (index_channel->get_tablets_filtered_rows().empty()) {
return Status::InternalError(
"Wrong filtered_rows empty table id = {} db id = {}",
_schema->table_id(), _schema->db_id());
}
_state->set_num_rows_filtered_in_strict_mode_partial_update(
index_channel->num_rows_filtered());
}
Expand Down
4 changes: 4 additions & 0 deletions be/src/vec/sink/writer/vtablet_writer.h
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,10 @@ class IndexChannel {
void set_tablets_filtered_rows(
const std::vector<std::pair<int64_t, int64_t>>& tablets_filtered_rows, int64_t node_id);

std::map<int64_t, std::vector<std::pair<int64_t, int64_t>>> get_tablets_filtered_rows() {
return _tablets_filtered_rows;
}

int64_t num_rows_filtered() {
DCHECK(!_tablets_filtered_rows.empty());
// the Unique table has no roll up or materilized view
Expand Down

0 comments on commit 66ba0de

Please sign in to comment.