Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
csun5285 committed Nov 18, 2024
1 parent 9df87f0 commit 29755a6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions be/src/cloud/cloud_schema_change_job.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,8 @@ Status CloudSchemaChangeJob::_convert_historical_rowsets(const SchemaChangeParam
num_output_rows += rs->num_rows();
size_output_rowsets += rs->total_disk_size();
num_output_segments += rs->num_segments();
index_size_output_rowsets += rs->index_disk_size();
segment_size_output_rowsets += rs->data_disk_size()
}
sc_job->set_num_output_rows(num_output_rows);
sc_job->set_size_output_rowsets(size_output_rowsets);
Expand Down
4 changes: 2 additions & 2 deletions cloud/src/meta-service/meta_service_txn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1911,7 +1911,7 @@ void commit_txn_eventually(
for (auto& [_, i] : tmp_rowsets_meta) {
// Accumulate affected rows
auto& stats = tablet_stats[i.tablet_id()];
stats.data_size += i.data_disk_size();
stats.data_size += i.total_disk_size();
stats.num_rows += i.num_rows();
++stats.num_rowsets;
stats.num_segs += i.num_segments();
Expand Down Expand Up @@ -2287,7 +2287,7 @@ void commit_txn_with_sub_txn(const CommitTxnRequest* request, CommitTxnResponse*

// Accumulate affected rows
auto& stats = tablet_stats[tablet_id];
stats.data_size += i.data_disk_size();
stats.data_size += i.total_disk_size();
stats.num_rows += i.num_rows();
++stats.num_rowsets;
stats.num_segs += i.num_segments();
Expand Down
4 changes: 3 additions & 1 deletion cloud/test/meta_service_job_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,11 @@ void insert_rowsets(TxnKv* txn_kv, int64_t table_id, int64_t index_id, int64_t p
std::deque<std::string> buffer;
int data_size = 0, num_rows = 0, num_seg = 0, index_size = 0, segment_size = 0;
for (auto& rowset : rowsets) {
data_size += rowset.data_disk_size();
data_size += rowset.total_disk_size();
num_rows += rowset.num_rows();
num_seg += rowset.num_segments();
index_size += rowset.index_disk_size();
segment_size += rowset.data_disk_size();
auto& key = buffer.emplace_back();
auto& val = buffer.emplace_back();
meta_rowset_key({instance_id, tablet_id, rowset.end_version()}, &key);
Expand Down

0 comments on commit 29755a6

Please sign in to comment.